home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / os2 / rxbas132.zip / REXXBASE.INF (.txt) < prev    next >
OS/2 Help File  |  1994-07-13  |  74KB  |  3,410 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. RexxBase The dBase Database For Rexx ΓòÉΓòÉΓòÉ
  3.  
  4. RexxBase and "The dBase Database for Rexx" are trademarks of American Coders, 
  5. LTD. 
  6.  
  7. OS/2 is a registered trademark of the International Business Machines 
  8. Corporation. 
  9.  
  10. dBase and dBase III are trademarks of Borland Corporation. 
  11.  
  12. Other trademarks are the trademarks of their respective trademark owners. 
  13.  
  14. Contacts: 
  15.  
  16. American Coders, LTD. 
  17.  
  18. Post Office Box 97462 
  19.  
  20. Raleigh, NC 27624 
  21.  
  22. (919) 846-2014 
  23.  
  24. CompuServe ID:  74150,2370 
  25.  
  26. Internet(USENET) ID: joe@usacoder.rtp.nc.us 
  27.  
  28.  
  29. July 1994 Edition.  Version 1.32. 
  30.  
  31. Copyright 1993-94 American Coders LTD Raleigh NC USA 
  32.  
  33.  
  34. ΓòÉΓòÉΓòÉ 1.1. Rights and Limitations ΓòÉΓòÉΓòÉ
  35.  
  36. American Coders, LTD makes no warranties as to the information in this guide. 
  37. Additionally, American Coders Ltd is not responsible or liable for any loss or 
  38. damage of any kind resulting from use of this product. 
  39.  
  40. The Software is protected by the copyright laws of the United States of 
  41. America, as well as by the copyright laws of many other countries pursuant to 
  42. international treaties.  All rights reserved.  No part of the RexxBase computer 
  43. program, documentation or related files may be reproduced photocopied, stored 
  44. on a retrieval system, or transmitted except as provided by U. S. copyright 
  45. law. 
  46.  
  47.  
  48. ΓòÉΓòÉΓòÉ 1.2. System Overview. ΓòÉΓòÉΓòÉ
  49.  
  50. RexxBase is a REXX external function DLL to be used by your command files to 
  51. access dBase files. RexxBase offers database access functions to Rexx command 
  52. procedures.  By using the RexxBase functions, Rexx programs gain access to tens 
  53. of thousands of database files written, primarily, for the PC/MS Dos 
  54. environment. 
  55.  
  56. RexxBase generates dBase field names and values that are available directly to 
  57. a Rexx program.  The Rexx program can change this data and update dBase files 
  58. directly.  Also database file control information is available to the Rexx 
  59. program.  This information includes such data as last date the database was 
  60. updated, number of records on file, field names, etc. 
  61.  
  62. RexxBase is distributed using the Shareware system. Every shareware copy of the 
  63. program comes with a 30 day trial offer.  If after 30 days the user finds the 
  64. RexxBase product acceptible they are expected to register and pay $95.00 plus 
  65. shipping/handling/taxes.  Registered users of the product receive a free 
  66. upgrade to the current release, 90 days free support on CompuServe and 30 days 
  67. free telephone support. 
  68.  
  69. The product is being marketed through the shareware distribution method to 
  70. determine market demands of the product and future needs and enhancements.  If 
  71. the product proves to be marketable, meaning more than 100 units are registered 
  72. within any 30 day period, then the product will be sold and distributed through 
  73. retail channels. 
  74.  
  75.  
  76. ΓòÉΓòÉΓòÉ 1.3. How To Register Your Copy ΓòÉΓòÉΓòÉ
  77.  
  78. We have several methods for you to register your copy of RexxBase. 
  79.  
  80. o Registration Form. 
  81.  
  82. o Faxing or 800 Number and Credit Cards. 
  83.  
  84. o CompuServe SWREG. 
  85.  
  86. There is also a shipping and handling charge.  For U.S. and Canada 
  87. registrations it is $10.00. Fo all other international orders $15.00. 
  88.  
  89. If you are planning to order ten (10) or more copies use the SITELICE.DOC in 
  90. your package. 
  91.  
  92.  
  93. ΓòÉΓòÉΓòÉ 1.3.1. Registration Form. ΓòÉΓòÉΓòÉ
  94.  
  95. Print out the file REGISTER.FRM.  Attach a check and mail to us using the 
  96. address on the form (or see above). 
  97.  
  98.  
  99. ΓòÉΓòÉΓòÉ 1.3.2. 800 Number and Credit Cards. ΓòÉΓòÉΓòÉ
  100.  
  101. American Coders is using the services of PsL "Public (software) Library". They 
  102. provide a service for all shareware authors, for a small fee they will take 
  103. credit card orders through their 800 number and Fax.  Once PsL has notified us 
  104. of your order, we will ship it within two days. 
  105.  
  106. PsL does NOT handle question or inquiries. 
  107.  
  108. RexxBase Psl item/product number is 11174. 
  109.  
  110. CREDIT CARD ORDERS ONLY - 
  111.  
  112. You can order with MC, Visa, Amex, or Discover from Public (software) Library 
  113. by calling 800-2424-PsL or 713-524-6394 or by FAX to 713-524-6398 or by CIS 
  114. Email to 71355,470. You can also mail credit card orders to PsL at P.O.Box 
  115. 35705, Houston, TX 77235-5705. 
  116.  
  117. THE ABOVE NUMBERS ARE FOR ORDERS ONLY. 
  118.  
  119. Any questions about the status of the shipment of the order, refunds, 
  120. registration options, product details, technical support, volume discounts, 
  121. dealer pricing, site licenses, etc, must be directed to 919-846-2014 or write 
  122. American Coders at our address. 
  123.  
  124. To insure that you get the latest version, PsL will notify you the day of your 
  125. order and we will ship the product directly to you. 
  126.  
  127.  
  128. ΓòÉΓòÉΓòÉ 1.3.3. CompuServe SWREG. ΓòÉΓòÉΓòÉ
  129.  
  130. CompuServe offers a service to register shareware software. 
  131.  
  132. GO SWREG and follow the directions. 
  133.  
  134. RexxBase SWREG number is 1953. 
  135.  
  136. Charges are billed to your CompuServe account. 
  137.  
  138. Any questions about the status of the shipment of the order, refunds, 
  139. registration options, product details, technical support, volume discounts, 
  140. dealer pricing, site licenses, etc, must be directed to 919-846-2014 or write 
  141. American Coders at our address. 
  142.  
  143.  
  144. ΓòÉΓòÉΓòÉ 1.4. Version and Requirements. ΓòÉΓòÉΓòÉ
  145.  
  146. Version 1.32 
  147.  
  148. RexxBase runs under 
  149.  
  150. o OS/2 2.0 or higher 
  151.  
  152. o requires a minimum of 6 megabytes of RAM. 
  153.  
  154. o requires 500k of disk space. 
  155.  
  156.  
  157. ΓòÉΓòÉΓòÉ 1.5. Version History. ΓòÉΓòÉΓòÉ
  158.  
  159. The following is a basic history of changes for each version and release. 
  160.  
  161.  
  162. ΓòÉΓòÉΓòÉ 1.5.1. Version 1.32 July 12, 1994 (Bug fix) ΓòÉΓòÉΓòÉ
  163.  
  164. Character Fields were stored right justified. 
  165.  
  166.  
  167. ΓòÉΓòÉΓòÉ 1.5.2. Version 1.31 June 23, 1994 (Bug fix) ΓòÉΓòÉΓòÉ
  168.  
  169. Memo Fields were not updated in DBT file correctly. 
  170.  
  171. Write, Update, and Pack routines would only process first memo field of a 
  172. record. 
  173.  
  174. Improved Pack function. 
  175.  
  176. Recompiled with C Set++ Version 2.1 compiler. 
  177.  
  178.  
  179. ΓòÉΓòÉΓòÉ 1.5.3. Version 1.30 May 27, 1994 ΓòÉΓòÉΓòÉ
  180.  
  181.  Major enhancement that will change the way you use MEMO fields in RexxBase. 
  182.  
  183.  Each MEMO field is now stored as a single REXX variables.  The previous 
  184. versions of RexxBase stored MEMO fields in a stem variable (array-like) 
  185. structure. 
  186.  
  187. Added logic to update index pointers when RexxBase_GotoRecord function used TOP 
  188. or BOTTOM options. 
  189.  
  190. RexxBase_FindRecord is used against a database with no records created a system 
  191. error SYS3175. 
  192.  
  193. RexxBase_SortDBF added an extra byte to header.  Data fields off by 1. 
  194.  
  195. Added a new functions to registered version: 
  196.  
  197.  Rexxbase_ChangePrimaryIndex, used to reset the Primary index to one of the 
  198. predefined secondary indexes. 
  199.  
  200.  Rexxbase_SummarizeDBF function.  This sorts and summarizes a database file on 
  201. all of the sort fields. Summary is on all of the numeric fields in the 
  202. database.  It also adds two fields SUMMARYCNT and SUMMARYFLD to the sorted 
  203. file. 
  204.  
  205.  Rexxbase_Soundex function.  This is the ubiquitous SOUNDEX fucntions that will 
  206. return a four byte string based on a string passed to it. 
  207.  
  208.  
  209. ΓòÉΓòÉΓòÉ 1.5.4. Version 1.23 Mar 15, 1994 ΓòÉΓòÉΓòÉ
  210.  
  211.  Forgot to define Rexxbase_ShutDown for LINKER in shareware.DEF file. Caused 
  212. function not found condition. 
  213.  
  214. Forgot to define Rexxbase_ShutDown, Rexxbase_FilterDBF,  Rexxbase_ScanForRecord 
  215. and  Rexxbase_JoinDBF for LINKER in registered .DEF file. Caused function not 
  216. found condition. 
  217.  
  218.  When opened with an index, if ReadDBF done first, function returned second 
  219. record in index. 
  220.  
  221.  Sort routine checked Join connection too soon.  No sorts would work. 
  222.  
  223.  Delete and Undelete functions were creating index records. 
  224.  
  225.  An invalid value for not-delete in the delete indicator. 
  226.  
  227.  Corrected error in CreateDBF function. NUM FIELDS with DECIMAL POSITIONS were 
  228. rejected. 
  229.  
  230.  Corrected error in field truncation. NUM fields with sizes > 9 and no DECIMAL 
  231. POSITIONS were limited to about 2 billion.  Any field with lengths greater than 
  232. 9 were truncated to values lessr than 2B.  Still some rounding errors for 
  233. fields with sizes greater 17 and with decimal positions.  This may be a 
  234. limitation of REXX because the numbers store correctly in the DBF. 
  235.  
  236.  
  237. ΓòÉΓòÉΓòÉ 1.5.5. Version 1.22  Mar. 1, 1994 ΓòÉΓòÉΓòÉ
  238.  
  239.  Prevented Rexxbase_UpdateDBF from executing when the record pointer is at TOF 
  240. or BOF. 
  241.  
  242.  Corrected Rexxbase_CloseDBF function.  The database name passed was not being 
  243. freed from the list. 
  244.  
  245.  Added new function to shareware version: 
  246.  
  247. o Rexxbase_ShutDown. 
  248.  
  249.  Added new functions to registered version: 
  250.  
  251. o Rexxbase_FilterDBF 
  252.  
  253. o Rexxbase_ScanForRecord 
  254.  
  255. o Rexxbase_JoinDBF 
  256.  
  257.  Added new control variable Rexxbase.UpdateHeaderCounter and logic that updates 
  258. the dbase header record based on the counter. 
  259.  
  260.  Added the option TOP to the Rexxbase_GotoRecord function. 
  261.  
  262.  Added the option BOT or BOTTOM to Rexxbase_GotoRecord function. 
  263.  
  264.  
  265. ΓòÉΓòÉΓòÉ 1.5.6. Version 1.21  Feb. 15, 1994 ΓòÉΓòÉΓòÉ
  266.  
  267.  FindRecord  parameter 3 was misspelled. 
  268.  
  269.  Added Create Index function to get field names in a quoted string. 
  270.  
  271.  Indexing control variable too small, limitted record counts to < 128. 
  272.  
  273.  Problem when passing an empty string i.e. RexxBase_FindRecord('dbf','') 
  274.  
  275.  REXXBASE.RECORDNUMBER was misspelled in DLL. 
  276.  
  277.  Rexxbase_ReadPrev would go back two records. 
  278.  
  279.  Rexxbase_GotoRecord abended when run right after Rexxbase_CreateIndex 
  280.  
  281.  
  282. ΓòÉΓòÉΓòÉ 1.5.7. Version 1.20  Jan. 31. 1994 ΓòÉΓòÉΓòÉ
  283.  
  284. Added the EXACT option to the Rexxbase_FindRecord function. 
  285.  
  286. For shareware distributed version, can open up to DBF's five(5) at a time and 
  287. up to 2(two) indexes. 
  288.  
  289. Added date routines to registered version: 
  290.  
  291. o Rexxbase_FormatDate 
  292.  
  293. o Rexxbase_InternalDate 
  294.  
  295. o Rexxbase_DaysDifference 
  296.  
  297. o Rexxbase_DateCalc. 
  298.  
  299. Added import/export file functions to registered version. 
  300.  
  301. o Rexxbase_ExportDBF 
  302.  
  303. o Rexxbase_ImportDBF 
  304.  
  305.  
  306. ΓòÉΓòÉΓòÉ 1.5.8. Version 1.18 Final Beta Jan 20, 1994 ΓòÉΓòÉΓòÉ
  307.  
  308. Bug fixes. 
  309.  
  310.  
  311. ΓòÉΓòÉΓòÉ 1.5.9. Version 1.17 Beta Jan 10, 1994 ΓòÉΓòÉΓòÉ
  312.  
  313. Added record locking with the following functions: 
  314.  
  315. o Rexxbase_ReadAndLockDBF 
  316.  
  317. o Rexxbase_ReadAndLockPrevDBF 
  318.  
  319. o Rexxbase_UnlockDBF 
  320.  
  321. o Rexxbase_SetLockTimeout 
  322.  
  323. Corrected bug that did not allow mulitple database processing. 
  324.  
  325. Corrected numeric key field length - was too small. 
  326.  
  327. Added logic to prevent creating keys greater than 100 bytes. 
  328.  
  329. Updated documentation. 
  330.  
  331.  
  332. ΓòÉΓòÉΓòÉ 1.5.10. Version 1.16 Beta Jan 3, 1994 ΓòÉΓòÉΓòÉ
  333.  
  334. Correct field alignment in dbf file.  You will have to recreate your files due 
  335. to this error. 
  336.  
  337. Logical fields not stored correctly. 
  338.  
  339. Removed zero padding from numeric fields. 
  340.  
  341. Numeric fields not stored correctly (i.e.  NUM 4.2 could store 10.5 when 0.50 
  342. is the correct value). 
  343.  
  344.  
  345. ΓòÉΓòÉΓòÉ 1.5.11. Version 1.15 Beta Dec 22, 1993 ΓòÉΓòÉΓòÉ
  346.  
  347. Last update field not set correctly, mainly effected create functions. 
  348.  
  349. Invalid date field should be set to spaces not zeroes. 
  350.  
  351. Corrected errors in updating numeric fields 
  352.  
  353. Corrected record alignment 
  354.  
  355. Corrected documentation. 
  356.  
  357.  
  358. ΓòÉΓòÉΓòÉ 1.5.12. Version 1.14 Beta Dec 15, 1993. ΓòÉΓòÉΓòÉ
  359.  
  360. Numeric fields not stored in correctly. 
  361.  
  362. Corrected documentation. 
  363.  
  364.  
  365. ΓòÉΓòÉΓòÉ 1.5.13. Version 1.13 Beta Dec 7, 1993. ΓòÉΓòÉΓòÉ
  366.  
  367. Not released.  Bug fixes to indexes. 
  368.  
  369.  
  370. ΓòÉΓòÉΓòÉ 1.5.14. Version 1.12 Beta Dec 1, 1993. ΓòÉΓòÉΓòÉ
  371.  
  372. Corrected CreateDBF and CreateFromDBF functions, database names were not being 
  373. added to (internal) active database list. 
  374.  
  375. Index files - date field WAS being created floating point like dBase iii.  Now 
  376. it's character. 
  377.  
  378. Index files - failed to allow mismatch field types. 
  379.  
  380. Corrected documentation. 
  381.  
  382.  
  383. ΓòÉΓòÉΓòÉ 1.5.15. Version 1.11 Beta Nov.  22, 1993. ΓòÉΓòÉΓòÉ
  384.  
  385. Added national language support date function. 
  386.  
  387. Corrected CreateDBF and CreateFromDBF functions. 
  388.  
  389. Corrected documentation. 
  390.  
  391.  
  392. ΓòÉΓòÉΓòÉ 1.5.16. Version 1.10 Beta Nov.  15, 1993 ΓòÉΓòÉΓòÉ
  393.  
  394. Multi file access 
  395.  
  396. Index access and other functions 
  397.  
  398. Create functions 
  399.  
  400. Modify structures 
  401.  
  402. Improved Initialization Routine 
  403.  
  404. Improved error reporting 
  405.  
  406. Improved documentation 
  407.  
  408.  
  409. ΓòÉΓòÉΓòÉ 1.5.17. Version 1.02 Alpha Oct.  15, 1993 ΓòÉΓòÉΓòÉ
  410.  
  411. Bug fix. 
  412.  
  413.  
  414. ΓòÉΓòÉΓòÉ 1.5.18. Version 1.01 Alpha Sep 1, 1993 ΓòÉΓòÉΓòÉ
  415.  
  416. Initial release. 
  417.  
  418.  
  419. ΓòÉΓòÉΓòÉ 1.6. American Coders Ltd. ΓòÉΓòÉΓòÉ
  420.  
  421. American Coders, LTD. 
  422.  
  423. Post Office Box 97462 
  424.  
  425. Raleigh, NC 27624 
  426.  
  427. (919) 846-2014 
  428.  
  429. CompuServe ID:  74150,2370 
  430.  
  431. Programming Solutions For Your Business 
  432.  
  433.  
  434. ΓòÉΓòÉΓòÉ 1.7. How To Install ΓòÉΓòÉΓòÉ
  435.  
  436. The program does not have an automatic installation routine. 
  437.  
  438. You will have to unzip the files into any existing directory.  Make sure to 
  439. have the DLL located in a directory that is specified in your systems LIBPATH. 
  440.  
  441.  
  442. ΓòÉΓòÉΓòÉ 2. RexxBase File Structures. ΓòÉΓòÉΓòÉ
  443.  
  444. Every attempt has been made to keep the RexxBase DBF, DBT and NDX files 
  445. similar.  But due to the inherent differences between DOS, OS2, REXX and PRG 
  446. files we could not keep the contents of a NDX file similar. 
  447.  
  448.  
  449. ΓòÉΓòÉΓòÉ 2.1. File Naming. ΓòÉΓòÉΓòÉ
  450.  
  451. RexxBase does not use default file extensions.  This due to the inherent nature 
  452. of HPFS files with its flexible file names.  When opening and creating files be 
  453. sure to use a fully qualified name. 
  454.  
  455.  
  456. ΓòÉΓòÉΓòÉ 2.2. Database (DBF) File. ΓòÉΓòÉΓòÉ
  457.  
  458. There should be no difference between RexxBase DBF files and other xBase DBF. 
  459. If you feel that you found an inconsistency with RexxBase DBF files, please 
  460. notify us immediately. 
  461.  
  462.  
  463. ΓòÉΓòÉΓòÉ 2.3. Memo (DBT) File. ΓòÉΓòÉΓòÉ
  464.  
  465. THIS IS A MAJOR CHANGE FROM OLDER VERSIONS OF REXXBASE. 
  466.  
  467. DBT files used to store MEMO field data, look like regular variables to Rexx. 
  468. With our testing, we have stored fields up to 262144 bytes in length. The 
  469. theoritical limit is 2^32 - 1. Please refer to the Memo section for more 
  470. information. 
  471.  
  472.  
  473. ΓòÉΓòÉΓòÉ 2.4. Index (NDX) File Field Differences. ΓòÉΓòÉΓòÉ
  474.  
  475. The ability to use index files is an integral part of any good database system. 
  476. We have introduced, what we feel, is an improved, yet limited, form of file 
  477. structures to RexxBase. 
  478.  
  479. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  480. ΓöéDifferenceΓöéDescription                                  Γöé
  481. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  482. ΓöéSimple    ΓöéRexxBase does not use xBase functions within Γöé
  483. ΓöéData TypesΓöéindex functions.  Nor does it use inverse    Γöé
  484. Γöé          Γöédefinitions, i.e.  using a minus sign to moveΓöé
  485. Γöé          Γöéin a reverse key scan.                       Γöé
  486. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  487. ΓöéMixing    ΓöéRexxBase allows the mixing of Character,     Γöé
  488. ΓöéData TypesΓöéNumeric and Date data types.  All data in    Γöé
  489. Γöé          Γöéthis format are treated as Character by      Γöé
  490. Γöé          ΓöéRexxBase.                                    Γöé
  491. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  492. ΓöéDate Data ΓöéDate data types are treated as Character dataΓöé
  493. ΓöéTypes     Γöéand stored in the index in the native format.Γöé
  494. Γöé          ΓöéDate data types can be concatenated together Γöé
  495. Γöé          Γöéwith other data types. Some xBase products   Γöé
  496. Γöé          Γöéstore date in the index in a floating point  Γöé
  497. Γöé          Γöéformat.  By removing the floating point      Γöé
  498. Γöé          Γöéformat you should see a improvement in index Γöé
  499. Γöé          Γöéfile accessing for data types.               Γöé
  500. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  501. ΓöéNumeric   ΓöéNumeric data types are stored in a floating  Γöé
  502. ΓöéData TypesΓöépoint format.  When a key is defined as      Γöé
  503. Γöé          Γöénumeric all of the fields are summed         Γöé
  504. Γöé          Γöétogether.                                    Γöé
  505. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  506. ΓöéAccessing ΓöéThe only time you may access NDX files from  Γöé
  507. ΓöéxBase NDX Γöéother xBase programs is if the dBase index   Γöé
  508. Γöéfiles.    Γöéfile is strictly Character or Numeric fields Γöé
  509. Γöé          ΓöéONLY. Indexes using xBase functions are not  Γöé
  510. Γöé          Γöésupported by RexxBase.                       Γöé
  511. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  512.  
  513. See also Rexxbase.Unique. 
  514.  
  515.  
  516. ΓòÉΓòÉΓòÉ 3. How Initialize REXX For RexxBase Functions. ΓòÉΓòÉΓòÉ
  517.  
  518. Before calling any RexxBase functions your REXX command file must register the 
  519. RexxBase DLL.  To do this use the REXX command RXFUNCADD.  You need to register 
  520. only one RexxBase function - Rexxbase_Init.  Rexxbase_Init, when called, will 
  521. register all of the other RexxBase routines.  Since Rexxbase_Init cannot 
  522. register itself, your Rexx program must register it. 
  523.  
  524. Use RXFUNCADD to register the Rexxbase_Init function. 
  525.  
  526. Once registered, RexxBase will not have to be registered until the next time 
  527. you restart OS/2. 
  528.  
  529. If you want your REXX program can register the RexxBase functions. 
  530.  
  531. The format of the command is  RXFUNCADD(function, dll, procedure) 
  532.  
  533. function is the name of the RexxBase routine as your procedure will call it. 
  534.  
  535. dll is the name of the RexxBase DLL file.  (Unless you rename it, it will 
  536. always be REXXBASE). 
  537.  
  538. procedure is the name of the function internal to the RexxBase DLL. 
  539.  
  540. Your program should contain the following: 
  541.  
  542. /* REXX */
  543. ret = rxfuncadd(rexxbase_init,Rexxbase,"Rexxbase_Init")
  544. ret = rexxbase_init()
  545.  
  546.  
  547. ΓòÉΓòÉΓòÉ 3.1. Example of Dropping a RexxBase Function. ΓòÉΓòÉΓòÉ
  548.  
  549. When your procedure is done with the RexxBase functions it can drop the 
  550. RexxBase functions.  This may help reduce memory requirements and free up 
  551. system resources.  Once dropped, a function will have to be re-registered if it 
  552. is to be used again. 
  553.  
  554. rxfuncdrop(rexxbase_opendbf,Rexxbase,"Rexxbase_OpenDBF") 
  555.  
  556. Return codes most likely to be returned are: 
  557.  
  558. o  0 - ok. 
  559. o  40 - function not found. 
  560.  
  561. For more information about return codes from Rexx, refer to the IBM 
  562. documentation. 
  563.  
  564.  
  565. ΓòÉΓòÉΓòÉ 4. The RexxBase Functions. ΓòÉΓòÉΓòÉ
  566.  
  567. This release of RexxBase offers several functions to read, write and update 
  568. your database records.  Also available are functions to create database, modify 
  569. database structures and to sort databases. 
  570.  
  571.  
  572. ΓòÉΓòÉΓòÉ 4.1. Rexxbase_OpenDBF. ΓòÉΓòÉΓòÉ
  573.  
  574. Description.  Prior to processing a database file, the file must be opened. 
  575. When your procedure opens the database file several activities occur. 
  576.  
  577. o The database file is opened. 
  578. o RexxBase creates database related stem variable concerning system and file 
  579.   status. 
  580. o RexxBase creates a stem variable containing field names, types and sizes. 
  581. o If indexes are specified then these files are opened. 
  582.  
  583. Purpose. 
  584.  
  585. To open the database for processing. 
  586.  
  587. Format. 
  588.  
  589. rexxbase_opendbf("dbfname"[,index1[,index2[,...]]]) 
  590.  
  591. Parameters. 
  592.  
  593. dbfname 
  594.           The REXX variable contains the name of your database as it is known 
  595.           to the operating system. 
  596. index1 
  597.           The master index file name as it is known to the operating system. 
  598.           Unlike the dbfname, which is the REXX Variable name passed within 
  599.           quotes.  The index file name is the OS/2 filename.  You can use a 
  600.           REXX variable to pass the name, just don't put it in quotes.  THIS IS 
  601.           AN OPTIONAL PARAMETER. 
  602. index2 ... 
  603.           The alternative index file names as they are known to the operating 
  604.           system. Like the master index file name, they are the OS/2 filenames. 
  605.           You can use a REXX variable to pass the name, just don't put it in 
  606.           quotes.  THIS IS AN OPTIONAL PARAMETER. 
  607.  
  608. You must set the database name in the variable prior to use.  And you must pass 
  609. the variable name in a string.  For example. 
  610.  
  611. myfilename = 'c:\xbase\machines.dbf'
  612. ret = rexxbase_opendbf('myfilename')
  613.  
  614. Return Value  Description 
  615.  
  616. "". 
  617.           Normal 
  618.  
  619. No Rexx DBF Name specified 
  620.           The first parameter of function call is missing. 
  621.  
  622. Bad Variable Name 
  623.           The variable name passed to the routine is not a valid REXX Name 
  624.  
  625. No File Name Assigned To Variable. 
  626.           The variable was not assigned a value. 
  627.  
  628. Database Name Already In Use. 
  629.           The name passed is already assigned to another opened database. 
  630.  
  631. Can't open. 
  632.           Operating System error.  File and system errors are written to the 
  633.           console, printer or  rexxbase.error  stem variable. 
  634.  
  635. Can't open index, Database File opened. 
  636.           The RexxBase could not open any one of the index files specified. 
  637.           Depending on which file failed, any index files specified after it 
  638.           will not be opened. 
  639.  
  640.  For multi-user access refer to the following RexxBase variable: 
  641.  
  642. o Rexxbase.Read 
  643.  
  644. o Rexxbase.Write 
  645.  
  646. o Rexxbase.Share 
  647.  
  648. Sample Without An Index File 
  649.  
  650. /* REXX */
  651. dbf = c:\users\net.dbf
  652. ret = rexxbase_opendbf('dbf')
  653. if ret \= '' then do
  654.    say ret
  655.    exit
  656.  end
  657.  
  658. Sample With An Index File 
  659.  
  660. /* REXX */
  661. dbf = c:\users\net.dbf
  662. ret = rexxbase_opendbf('dbf',c:\users\net.ndx)
  663. if ret \= '' then do
  664.   say ret
  665.   exit
  666. end
  667.  
  668.  
  669. ΓòÉΓòÉΓòÉ 4.2. Rexxbase_CloseDBF. ΓòÉΓòÉΓòÉ
  670.  
  671. Description.  When your procedure is done using the database file it should be 
  672. closed.  This allows your program to update the file correctly. 
  673.  
  674. Purpose. 
  675.  
  676. To close the database. 
  677.  
  678. Format. 
  679.  
  680. rexxbase_closedbf("dbfname") 
  681.  
  682. Parameters. 
  683.  
  684. dbfname 
  685.           The REXX variable contains the name of your database as you defined 
  686.           it in the Rexxbase_OpenDBF function. 
  687.  
  688. The name of the database is defined in a REXX variable.  You must pass the 
  689. variable name in a string.  For example. 
  690.  
  691. myfilename = 'c:\xbase\machines.dbf'
  692. ret = rexxbase_closedbf('myfilename')
  693.  
  694. Return Value  Description 
  695.  
  696. "". 
  697.           Normal 
  698.  
  699. No Rexx DBF Name specified 
  700.           The first parameter of function call is missing. 
  701.  
  702. Unknown Database Name. 
  703.           The name found, in the passed parameter, is not the same used to open 
  704.           a database. 
  705.  
  706. Sample. 
  707.  
  708. /* REXX */
  709. dbf = c:\users\net.dbf
  710. ret = rexxbase_opendbf('dbf')
  711. if ret \= '' then do
  712.    say ret
  713.    exit
  714.  end
  715. ret = rexxbase_closedbf('dbf')
  716. if ret\= '' then do
  717.   say ret
  718.   exit
  719.  end
  720. say the number of dbf record(s) are dbf.recordcount
  721.  
  722.  
  723. ΓòÉΓòÉΓòÉ 4.3. Rexxbase_CloseAllDBF. ΓòÉΓòÉΓòÉ
  724.  
  725. Description.  When your procedure is done using all of the database files they 
  726. should be closed.  This allows your program to update the files correctly. 
  727.  
  728. Purpose. 
  729.  
  730. To close all opened databases. 
  731.  
  732. Format. 
  733.  
  734. rexxbase_closealldbf() 
  735.  
  736. Parameters. 
  737.  
  738. N/A 
  739.           N/A 
  740.  
  741. The function does not use any parameters. For example, 
  742.  
  743. rexxbase_closealldbf()
  744.  
  745. Return Value  Description 
  746.  
  747. "". 
  748.           Normal 
  749.  
  750. Even though there are no other return values.  The internal processing errors 
  751. may be found in the  rexxbase.error  stem variable. 
  752.  
  753. Sample. 
  754.  
  755. /* REXX */
  756. dbf = c:\users\net.dbf
  757. ret = rexxbase_opendbf('dbf')
  758. if ret \= '' then do
  759.   say ret
  760.   exit
  761.  end
  762. dbf2 = c:\users\addr.dbf
  763. ret = rexxbase_opendbf('dbf2',addr.ndx)
  764. if ret \= '' then do
  765.   say ret
  766.   exit
  767.  end
  768. ret = rexxbase_closealldbf)
  769. if ret \=''  then do
  770.   say ret
  771.   exit
  772.  end
  773.  
  774.  
  775. ΓòÉΓòÉΓòÉ 4.4. Rexxbase_ReadDBF. ΓòÉΓòÉΓòÉ
  776.  
  777. Description.  Read the database fields into the REXX variables.  This commands 
  778. reads the next record in the file. 
  779.  
  780. Purpose. 
  781.  
  782. To read the next sequential record in the database. 
  783.  
  784. If the database was opened with an index, then the next record in the index 
  785. list is read. 
  786.  
  787. Format. 
  788.  
  789. rexxbase_readdbf("dbfname") 
  790.  
  791. Parameters. 
  792.  
  793. dbfname 
  794.           The REXX variable contains the name of your database as you defined 
  795.           it in the Rexxbase_OpenDBF function. 
  796.  
  797. The name of the database is defined in a REXX variable.  You must pass the 
  798. variable name in a string.  For example. 
  799.  
  800. /* rexx */
  801. myfilename = 'c:\xbase\machines.dbf'
  802. rexxbase_readdbf('myfilename')
  803.  
  804. Return Value  Description 
  805.  
  806. "". 
  807.           Normal 
  808.  
  809. No Rexx DBF Name specified 
  810.           The first parameter of function call is missing. 
  811.  
  812. BOF. 
  813.           End of file condition.  No record is read.  Record field values 
  814.           remain unchanged. 
  815.  
  816. Unknown Database Name. 
  817.           The name found in the passed parameter is not the same used to open 
  818.           the database. 
  819.  
  820. Unable to read file rc = XX. 
  821.           Record area could not be read.  Where XX is a return code from OS/2. 
  822.           If XX is equal to 5 then the operating system is denying access to 
  823.           that area.  If XX is equal to 33 then the record area has been 
  824.           locked.  For other values you can type on the command line "HELP XX" 
  825.           to find the values for XX. 
  826.  
  827. Sample. 
  828.  
  829. /* REXX */
  830. dbf = c:\users\net.dbf
  831. ret = rexxbase_opendbf('dbf')
  832. if ret \= '' then do
  833.   say ret
  834.   exit
  835.  end
  836. ret = rexxbase_readdbf('dbf')
  837. if ret = BOF then do
  838.   say end of file reached
  839.  end
  840.  
  841.  
  842. ΓòÉΓòÉΓòÉ 4.5. Rexxbase_ReadAndLockDBF. ΓòÉΓòÉΓòÉ
  843.  
  844. Description.  Read the database fields into the REXX variables and prevent 
  845. other functions within OS/2 from accessing these fields.  This commands reads 
  846. the next record in the file.  Contrary to its name the record area is locked 
  847. first and then read. 
  848.  
  849. The record area is unlocked by executing one of four functions: 
  850.  
  851. o updating the record with a Rexxbase_UpdateDBF 
  852.  
  853. o reading and locking with another Rexxbase_ReadAndLockDBF 
  854.  
  855. o reading and locking with a Rexxbase_ReadAndLockPrevDBF 
  856.  
  857. o unlocking with a Rexxbase_UnlockDBF. 
  858.  
  859. If left open, the record area is unlocked when the RexxBase DLL is dropped. 
  860.  
  861. Purpose. 
  862.  
  863. To gain sole access to the next sequential record in the database. 
  864.  
  865. If the database was opened with an index, then the next record in the index 
  866. list is read. 
  867.  
  868. Format. 
  869.  
  870. rexxbase_readandlockdbf("dbfname") 
  871.  
  872. Parameters. 
  873.  
  874. dbfname 
  875.           The REXX variable contains the name of your database as you defined 
  876.           it in the Rexxbase_OpenDBF function. 
  877.  
  878. The name of the database is defined in a REXX variable.  You must pass the 
  879. variable name in a string.  For example. 
  880.  
  881. /* rexx */
  882. myfilename = 'c:\xbase\machines.dbf'
  883. rexxbase_readandlockdbf('myfilename')
  884.  
  885. Return Value  Description 
  886.  
  887. "". 
  888.           Normal 
  889.  
  890. No Rexx DBF Name specified 
  891.           The first parameter of function call is missing. 
  892.  
  893. Unable to lock record area. 
  894.           Record area is already locked by another process. 
  895.  
  896. BOF. 
  897.           End of file condition.  No record is read.  Record field values 
  898.           remain unchanged. 
  899.  
  900. Unknown Database Name. 
  901.           The name found in the passed parameter is not the same used to open 
  902.           the database. 
  903.  
  904. Sample. 
  905.  
  906. /* REXX */
  907. dbf = c:\users\net.dbf
  908. ret = rexxbase_opendbf('dbf')
  909. if ret \= '' then do
  910.   say ret
  911.   exit
  912.  end
  913. ret = rexxbase_readandlockdbf('dbf')
  914. if ret <> "" then do
  915.   say record area already locked
  916.   end
  917. else do
  918.   dbf.time = time()
  919.   rc = rexxbase_updatedbf('dbf')
  920.  end
  921. rc = rexxbase_closedbf('dbf')
  922.  
  923.  
  924. ΓòÉΓòÉΓòÉ 4.6. Rexxbase_UnlockDBF. ΓòÉΓòÉΓòÉ
  925.  
  926. Description.  The command will unlock a record locked by a 
  927. Rexxbase_ReadAndLockDBF or Rexxbase_ReadAndLockPrevDBF command. 
  928.  
  929. Purpose. 
  930.  
  931. To unlock a locked record in the database. 
  932.  
  933. Format. 
  934.  
  935. Rexxbase_UnlockDBF("dbfname") 
  936.  
  937. Parameters. 
  938.  
  939. dbfname 
  940.           The REXX variable contains the name of your database as you defined 
  941.           it in the Rexxbase_OpenDBF function. 
  942.  
  943. The name of the database is defined in a REXX variable.  You must pass the 
  944. variable name in a string.  For example. 
  945.  
  946. /* rexx */
  947. myfilename = 'c:\xbase\machines.dbf'
  948. rexxbase_unlock('myfilename')
  949.  
  950. Return Value  Description 
  951.  
  952. "". 
  953.           Normal 
  954.  
  955. No Rexx DBF Name specified 
  956.           The first parameter of function call is missing. 
  957.  
  958. Unknown Database Name. 
  959.           The name found in the passed parameter is not the same used to open 
  960.           the database. 
  961.  
  962. Sample. 
  963.  
  964. /* REXX */ d
  965. bf = c:\users\net.dbf
  966. ret = rexxbase_opendbf('dbf')
  967. if ret \= '' then do
  968.   say ret
  969.   exit
  970.  end
  971. ret = rexxbase_readandlockdbf('dbf',dbf.recordcount)
  972. if dbf.date = date() then ret = rexxbase_unlockdbf('dbf')
  973. else do
  974.   dbf.date = date()
  975.   ret = rexxbase_updatedbf('dbf')
  976.  end
  977. ret = rexxbase_closedbf('dbf')
  978.  
  979.  
  980. ΓòÉΓòÉΓòÉ 4.7. Rexxbase_SetLockTimeout. ΓòÉΓòÉΓòÉ
  981.  
  982. Description.  The command will set a lock timeout value, in milliseconds, for 
  983. all record locking functions. 
  984.  
  985. Purpose. 
  986.  
  987. To allow a minimum amount time for testing record locks.  The default value is 
  988. zero.  If an incorrect value is specified then the default is used. 
  989.  
  990. Format. 
  991.  
  992. rexxbase_setlocktimeout(timeinmillisec) 
  993.  
  994. Parameters. 
  995.  
  996. timeinmillisec 
  997.           Timeout limit in milliseconds. 
  998.  
  999. rexxbase_setlocktimeout(100)
  1000.  
  1001. Return Value  Description 
  1002.  
  1003. "". 
  1004.           Normal 
  1005.  
  1006. No Lock Time Specified 
  1007.           The only parameter to this function is the lock test timeout value. 
  1008.           If none specified then the default value of zero will be used. 
  1009.  
  1010. Sample. 
  1011.  
  1012. /* REXX */
  1013. /* set locking time out test to 1000 milliseconds.  */
  1014. ret = rexxbase_setlocktimeout(1000)
  1015.  
  1016.  
  1017. ΓòÉΓòÉΓòÉ 4.8. Rexxbase_GoToRecord. ΓòÉΓòÉΓòÉ
  1018.  
  1019. Description.  The command will position at a specified record and read it. 
  1020.  
  1021. Purpose. 
  1022.  
  1023. To read a particular record in the database. 
  1024.  
  1025. Format. 
  1026.  
  1027. rexxbase_gotorecord("dbfname",recordnumber) 
  1028.  
  1029. Parameters. 
  1030.  
  1031. dbfname 
  1032.           The REXX variable contains the name of your database as you defined 
  1033.           it in the Rexxbase_OpenDBF function. 
  1034. recordnumber 
  1035.           The record number to read, or the following words 
  1036.  
  1037.            TOP - to go to the top of the database. 
  1038.  
  1039.            BOT or BOTTOM - to go to the bottom of the database. 
  1040.  
  1041. The name of the database is defined in a REXX variable.  You must pass the 
  1042. variable name in a string.  For example. 
  1043.  
  1044. myfilename = 'c:\xbase\machines.dbf'
  1045. rexxbase_gotorecord('myfilename',1)
  1046.  
  1047. Return Value  Description 
  1048.  
  1049. "". 
  1050.           Normal 
  1051.  
  1052. No Rexx DBF Name specified 
  1053.           The first parameter of function call is missing. 
  1054.  
  1055. No Record Number Specified. 
  1056.           You did not pass a record number in the second argument. 
  1057.  
  1058. Unknown Database Name. 
  1059.           The name found in the passed parameter is not the same used to open 
  1060.           the database. 
  1061.  
  1062. Bad Record Number. 
  1063.           You passed a record number that is invalid or is less than one.  No 
  1064.           record is read. 
  1065.  
  1066. BOF. 
  1067.           You passed a record number that is greater than the number on the 
  1068.           file or used the BOT or BOTTOM option.  No record is read.  Record 
  1069.           field values remain unchanged. BOF is a good return code if you used 
  1070.           the BOT or BOTTOM option. 
  1071.  
  1072. TOF. 
  1073.           You used the TOP option in the record number field.  This is a good 
  1074.           return code. 
  1075.  
  1076. Sample. 
  1077.  
  1078. /* REXX */
  1079. /* assume the database has a field name AMOUNT.  */
  1080. /* this example will get the last AMOUNT on file*/
  1081. dbf = c:\users\net.dbf
  1082. ret = rexxbase_opendbf('dbf')
  1083. if ret \= '' then do
  1084.   say ret
  1085.   exit
  1086.  end
  1087. ret = rexxbase_gotorecord('dbf',dbf.recordcount)
  1088. if ret = '' then say dbf.amount
  1089. ret = rexxbase_closedbf('dbf')
  1090.  
  1091.  
  1092. ΓòÉΓòÉΓòÉ 4.9. Rexxbase_ReadPrevDBF. ΓòÉΓòÉΓòÉ
  1093.  
  1094. Description.  Read the database fields into the REXX variables.  This commands 
  1095. reads the previous record in the file. 
  1096.  
  1097. Purpose. 
  1098.  
  1099. To read the previous sequential record in the database. 
  1100.  
  1101. If the database was opened with an index, then the previous record in the index 
  1102. list is read. 
  1103.  
  1104. Format. 
  1105.  
  1106. rexxbase_readprevdbf("dbfname") 
  1107.  
  1108. Parameters. 
  1109.  
  1110. dbfname 
  1111.           The REXX variable contains the name of your database as you defined 
  1112.           it in the Rexxbase_OpenDBF function. 
  1113.  
  1114. The name of the database is defined in a REXX variable.  You must pass the 
  1115. variable name in a string.  For example. 
  1116.  
  1117. myfilename = 'c:\xbase\machines.dbf'
  1118. rexxbase_readprevdbf('myfilename')
  1119.  
  1120. Return Value  Description 
  1121.  
  1122. "". 
  1123.           Normal 
  1124.  
  1125. No Rexx DBF Name specified 
  1126.           The first parameter of function call is missing. 
  1127.  
  1128. Unknown Database Name. 
  1129.           The name found in the passed parameter is not the same used to open 
  1130.           the database. 
  1131.  
  1132. Unable to read file rc = XX. 
  1133.           Record area could not be read.  Where XX is a return code from OS/2. 
  1134.           If XX is equal to 5 then the operating system is denying access to 
  1135.           that area.  If XX is equal to 33 then the record area has been 
  1136.           locked.  For other values you can type on the command line "HELP XX" 
  1137.           to find the values for XX. 
  1138.  
  1139. TOF. 
  1140.           Top of file condition.  No record is read.  Record field values 
  1141.           remain unchanged. 
  1142.  
  1143. Unknown Database Name. 
  1144.           The name found in the passed parameter is not the same used to open 
  1145.           the database. 
  1146.  
  1147. Sample. 
  1148.  
  1149. /* REXX Read the 10th and 9th records*/
  1150. dbf = c:\users\net.dbf
  1151. ret = rexxbase_opendbf('dbf')
  1152. if ret \= '' then do
  1153.   say ret
  1154.   exit
  1155.  end ret =
  1156. rexxbase_gotorecord('dbf',10)
  1157. ret = rexxbase_readprevdbf('dbf')
  1158. ret = rexxbase_closedbf('dbf')
  1159.  
  1160.  
  1161. ΓòÉΓòÉΓòÉ 4.10. Rexxbase_ReadAndLockPrevDBF. ΓòÉΓòÉΓòÉ
  1162.  
  1163. Description.  Read the database fields into the REXX variables and prevent 
  1164. other functions within OS/2 from accessing these fields.  This commands reads 
  1165. the previous record in the file.  Contrary to its name the record area is 
  1166. locked first and then read. 
  1167.  
  1168. The record area is unlocked by executing one of four functions: 
  1169.  
  1170. o updating the record with a Rexxbase_UpdateDBF 
  1171.  
  1172. o reading and locking with another Rexxbase_ReadAndLockDBF 
  1173.  
  1174. o reading and locking with a Rexxbase_ReadAndLockPrevDBF 
  1175.  
  1176. o unlocking with a Rexxbase_UnlockDBF. 
  1177.  
  1178. If left open, the record area is unlocked when the RexxBase DLL is dropped. 
  1179.  
  1180. If the database was opened with an index, then the previous record in the index 
  1181. list is read. 
  1182.  
  1183. Purpose. 
  1184.  
  1185. To gain sole access to the previous sequential record in the database. 
  1186.  
  1187. If the database was opened with an index, then the next record in the index 
  1188. list is read. 
  1189.  
  1190. Format. 
  1191.  
  1192. rexxbase_readandlockprevdbf("dbfname") 
  1193.  
  1194. Parameters. 
  1195.  
  1196. dbfname 
  1197.           The REXX variable contains the name of your database as you defined 
  1198.           it in the Rexxbase_OpenDBF function. 
  1199.  
  1200. The name of the database is defined in a REXX variable.  You must pass the 
  1201. variable name in a string.  For example. 
  1202.  
  1203. myfilename = 'c:\xbase\machines.dbf'
  1204. rexxbase_readandlockprevdbf('myfilename')
  1205.  
  1206. Return Value  Description 
  1207.  
  1208. "". 
  1209.           Normal 
  1210.  
  1211. No Rexx DBF Name specified 
  1212.           The first parameter of function call is missing. 
  1213.  
  1214. Unable to read file rc = XX. 
  1215.           Record area could not be read.  Where XX is a return code from OS/2. 
  1216.           If XX is equal to 5 then the operating system is denying access to 
  1217.           that area.  If XX is equal to 33 then the record area has been 
  1218.           locked.  For other values you can type on the command line "HELP XX" 
  1219.           to find the values for XX. 
  1220.  
  1221. TOF. 
  1222.           Top of file condition.  No record is read.  Record field values 
  1223.           remain unchanged. 
  1224.  
  1225. Unknown Database Name. 
  1226.           The name found in the passed parameter is not the same used to open 
  1227.           the database. 
  1228.  
  1229. Sample. 
  1230.  
  1231. /* REXX Read the 10th and 9th records*/
  1232. dbf = c:\users\net.dbf
  1233. ret = rexxbase_opendbf('dbf')
  1234. if ret \= '' then do
  1235.   say ret
  1236.   exit
  1237.  end
  1238. ret = rexxbase_gotorecord('dbf',10)
  1239. ret = rexxbase_readprevdbf('dbf')
  1240. ret = rexxbase_closedbf('dbf')
  1241.  
  1242.  
  1243. ΓòÉΓòÉΓòÉ 4.11. Rexxbase_FindRecord. ΓòÉΓòÉΓòÉ
  1244.  
  1245. Description.  The command will position at a specified record using the master 
  1246. index file. 
  1247.  
  1248. Purpose. 
  1249.  
  1250. To read a particular record in the database using the index file. 
  1251.  
  1252. Format. 
  1253.  
  1254. rexxbase_findrecord("dbfname","string",[EXACT]) 
  1255.  
  1256. Parameters. 
  1257.  
  1258. dbfname 
  1259.           The REXX variable contains the name of your database as you defined 
  1260.           it in the Rexxbase_OpenDBF function. 
  1261. string 
  1262.           The index key string used for searching. 
  1263. EXACT 
  1264.           Optional indicator to tell RexxBase to find the exact 'string' in the 
  1265.           index.  This would cause a Hard Find.  If not specified then RexxBase 
  1266.           would execute a Soft Find. 
  1267.  
  1268. The name of the database is defined in a REXX variable.  You must pass the 
  1269. variable name in a string.  For example. 
  1270.  
  1271. myfilename = 'c:\xbase\machines.dbf'
  1272. ret = rexxbase_findrecord('myfilename',"LASER 11")
  1273.  
  1274. Return Value  Description 
  1275.  
  1276. "". 
  1277.           Normal 
  1278.  
  1279. No REXX DBF Name 
  1280.           No argument was passed to the routine. 
  1281.  
  1282. No Locate String Specified 
  1283.           Second parameter of function is missing. 
  1284.  
  1285. Unknown Database Name. 
  1286.           The name found in the passed parameter is not the same used to open 
  1287.           the database. 
  1288.  
  1289. Index file not opened 
  1290.           When the database was opened, no index files were specified. 
  1291.  
  1292. Record Not Found (when EXACT is specified) 
  1293.           You passed a string that is not on the master index.  No record is 
  1294.           read. 
  1295.  
  1296. Record Not Found (when EXACT is not specified) 
  1297.           The string entered is higher than any on the index. 
  1298.  
  1299. Sample. 
  1300.  
  1301. /* REXX */
  1302. /* this example copies the first record of the database to the end */
  1303. dbf = c:\users\net.dbf
  1304. ndx = 'c:\xbase\net.ndx'
  1305. ret = rexxbase_opendbf('dbf',ndx)
  1306. if ret \= '' then do
  1307.   say ret
  1308.   exit
  1309.  end
  1310. ret = rexxbase_findrecord('dbf',"USA001')
  1311. if ret \= '' then do
  1312.   say find failed with ret
  1313.   exit
  1314.  end
  1315. say Network Disposition For USA001 is dbf.dispo
  1316. ret = rexxbase_closedbf('dbf')
  1317. if ret \  = '' then do
  1318.   say close failed with ret
  1319.   exit
  1320.  end
  1321.  
  1322.  
  1323. ΓòÉΓòÉΓòÉ 4.12. Rexxbase_WriteDBF. ΓòÉΓòÉΓòÉ
  1324.  
  1325. Description.  This will add a new record to the end of the database. 
  1326.  
  1327. Purpose. 
  1328.  
  1329. To add records to the database. 
  1330.  
  1331. Format. 
  1332.  
  1333. rexxbase_writedbf("dbfname") 
  1334.  
  1335. Parameters. 
  1336.  
  1337. dbfname 
  1338.           The REXX variable contains the name of your database as you defined 
  1339.           it in the Rexxbase_OpenDBF function. 
  1340.  
  1341. The name of the database is defined in a REXX variable.  You must pass the 
  1342. variable name in a string.  For example. 
  1343.  
  1344. /* */
  1345. myfilename = 'c:\xbase\machines.dbf'
  1346. ret = rexxbase_opendbf('myfilename')
  1347. rexxbase_writedbf('myfilename')
  1348. ret = rexxbase_closedbf('myfilename')
  1349.  
  1350. Return Value  Description 
  1351.  
  1352. "". 
  1353.           Normal 
  1354.  
  1355. No Rexx DBF Name specified 
  1356.           The first parameter of function call is missing. 
  1357.  
  1358. Unknown Database Name. 
  1359.           The name found in the passed parameter is not the same used to open 
  1360.           the database. 
  1361.  
  1362. Sample. 
  1363.  
  1364. /* REXX */
  1365. /* this example copies the first record of the database to the end */
  1366. dbf = c:\users\net.dbf
  1367. ret = rexxbase_opendbf('dbf')
  1368. if ret \= '' then do
  1369.   say ret
  1370.   exit
  1371.  end
  1372. ret = rexxbase_readdbf('dbf')
  1373. if ret \= '' then do
  1374.   say read failed with ret
  1375.   exit
  1376.  end
  1377. ret = rexxbase_writedbf('dbf')
  1378. if ret \  = '' then do
  1379.   say write failed with ret
  1380.   exit
  1381.  end
  1382. ret = rexxbase_closedbf('dbf')
  1383. if ret \  = '' then do
  1384.   say close failed with ret
  1385.   exit
  1386.  end
  1387.  
  1388.  
  1389. ΓòÉΓòÉΓòÉ 4.13. Rexxbase_UpdateDBF. ΓòÉΓòÉΓòÉ
  1390.  
  1391. Description.  This function will rewrite data at the current record position. 
  1392.  
  1393. Purpose. 
  1394.  
  1395. To update a record. 
  1396.  
  1397. Format. 
  1398.  
  1399. rexxbase_updatedbf("dbfname") 
  1400.  
  1401. Parameters. 
  1402.  
  1403. dbfname 
  1404.           The REXX variable contains the name of your database as you defined 
  1405.           it in the Rexxbase_OpenDBF function. 
  1406.  
  1407. The name of the database is defined in a REXX variable.  You must pass the 
  1408. variable name in a string.  For example. 
  1409.  
  1410. myfilename = 'c:\xbase\machines.dbf' ret =
  1411. rexxbase_updatedbf('myfilename')
  1412.  
  1413. Return Value  Description 
  1414.  
  1415. "". 
  1416.           Normal 
  1417.  
  1418. No Rexx DBF Name specified 
  1419.           The first parameter of function call is missing. 
  1420.  
  1421. Unknown Database Name. 
  1422.           The name found in the passed parameter is not the same used to open 
  1423.           the database. 
  1424.  
  1425. "Invalid Record Position" 
  1426.           The current record pointer is either at TOF or BOF. It is not 
  1427.           pointing to any particular record. 
  1428.  
  1429. Sample. 
  1430.  
  1431. /* REXX */
  1432. /* this example update the field AMOUNT on the first record of the database*/
  1433. dbf = c:\users\net.dbf
  1434. ret = rexxbase_opendbf('dbf')
  1435. if ret \= '' then do
  1436.   say ret
  1437.   exit
  1438.  end
  1439. ret = rexxbase_readdbf('dbf')
  1440. if ret \= '' then do
  1441.   say read failed with ret
  1442.   exit
  1443.  end
  1444. dbf.AMOUNT = dbf.AMOUNT * 2
  1445. ret = rexxbase_updatedbf('dbf')
  1446. if ret \  = '' then do
  1447.   say update failed with ret
  1448.   exit
  1449.  end
  1450. ret = rexxbase_closedbf('dbf')
  1451. if ret \  = '' then do
  1452.   say close failed with ret
  1453.   exit
  1454.  end
  1455.  
  1456.  
  1457. ΓòÉΓòÉΓòÉ 4.14. Rexxbase_PackDBF. ΓòÉΓòÉΓòÉ
  1458.  
  1459. Description.  This function removes logically deleted records from the 
  1460. database. 
  1461.  
  1462. Purpose. 
  1463.  
  1464. To remove deleted records.  If the file has been opened with indexes, then the 
  1465. index will be rebuilt. 
  1466.  
  1467. If the database has associated index files and they are not opened during the 
  1468. packing process the indexes will be incorrect. 
  1469.  
  1470. Format. 
  1471.  
  1472. rexxbase_packdbf("dbfname") 
  1473.  
  1474. Parameters. 
  1475.  
  1476. dbfname 
  1477.           The REXX variable contains the name of your database as you defined 
  1478.           it in the Rexxbase_OpenDBF function. 
  1479.  
  1480. The name of the database is defined in a REXX variable.  You must pass the 
  1481. variable name in a string.  For example. 
  1482.  
  1483. myfilename = 'c:\xbase\machines.dbf' ret =
  1484. rexxbase_packdbf('myfilename')
  1485.  
  1486. Return Value  Description 
  1487.  
  1488. "". 
  1489.           Normal 
  1490.  
  1491. No REXX DBF Name 
  1492.           No argument was passed to the routine. 
  1493.  
  1494. Unknown Database Name. 
  1495.           The name found in the passed parameter is not the same used to open 
  1496.           the database. 
  1497.  
  1498. Sample. 
  1499.  
  1500. /* REXX */
  1501. dbf = c:\users\net.dbf
  1502. ret = rexxbase_opendbf('dbf')
  1503. if ret \= "" then do
  1504.   say ret
  1505.   exit
  1506.  end
  1507. ret = rexxbase_packdbf('dbf')
  1508.  
  1509.  
  1510. ΓòÉΓòÉΓòÉ 4.15. Rexxbase_SortDBF ΓòÉΓòÉΓòÉ
  1511.  
  1512. Description.  This will sort a database file by fields names and create a new 
  1513. database file. 
  1514.  
  1515. Prior to calling the RexxBase Sort function you must specify the sort fields 
  1516. and the sort order for each field.  You do this by creating field names using 
  1517. the database variable name concatenated with the SORTFIELD string. 
  1518.  
  1519. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1520. ΓöéSort FieldΓöé*.SORTFIELD.0  ΓöéThe number of  Γöé               Γöé          Γöé
  1521. ΓöéCount     Γöé               Γöéfields to be   Γöé               Γöé          Γöé
  1522. Γöé          Γöé               Γöéused for sort  Γöé               Γöé          Γöé
  1523. Γöé          Γöé               Γöécriteria.      Γöé               Γöé          Γöé
  1524. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1525. ΓöéSort FieldΓöé*.SORTFIELD.1  ΓöéThe primary    Γöé*.SORTTYPE.1   ΓöéUse a     Γöé
  1526. ΓöéName 1    Γöé               Γöésort field.    Γöé               Γöévalue of  Γöé
  1527. Γöé          Γöé               Γöé               Γöé               Γöé"-" (minusΓöé
  1528. Γöé          Γöé               Γöé               Γöé               Γöésign) to  Γöé
  1529. Γöé          Γöé               Γöé               Γöé               Γöésort this Γöé
  1530. Γöé          Γöé               Γöé               Γöé               Γöéfield in  Γöé
  1531. Γöé          Γöé               Γöé               Γöé               ΓöédescendingΓöé
  1532. Γöé          Γöé               Γöé               Γöé               Γöéorder.    Γöé
  1533. Γöé          Γöé               Γöé               Γöé               ΓöéAny other Γöé
  1534. Γöé          Γöé               Γöé               Γöé               Γöévalue willΓöé
  1535. Γöé          Γöé               Γöé               Γöé               Γöésort the  Γöé
  1536. Γöé          Γöé               Γöé               Γöé               Γöéfield in  Γöé
  1537. Γöé          Γöé               Γöé               Γöé               Γöéascending Γöé
  1538. Γöé          Γöé               Γöé               Γöé               Γöéorder.    Γöé
  1539. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1540. Γöé...       Γöé...            Γöé               Γöé               Γöé          Γöé
  1541. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1542. ΓöéSort FieldΓöé*.SORTFIELD.n  ΓöéThe last sort  Γöé               Γöé          Γöé
  1543. Γöén         Γöé               Γöéfield in       Γöé               Γöé          Γöé
  1544. Γöé          Γöé               Γöépriority.  The Γöé               Γöé          Γöé
  1545. Γöé          Γöé               Γöévalue of n     Γöé               Γöé          Γöé
  1546. Γöé          Γöé               Γöéshould be equalΓöé               Γöé          Γöé
  1547. Γöé          Γöé               Γöéto the value   Γöé               Γöé          Γöé
  1548. Γöé          Γöé               Γöéspecified in   Γöé               Γöé          Γöé
  1549. Γöé          Γöé               Γöédbname.SORTFIELΓöé               Γöé          Γöé
  1550. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1551.  
  1552. Purpose. 
  1553.  
  1554. To sort a database. 
  1555.  
  1556. Format. 
  1557.  
  1558. rexxbase_sortdbf("dbfname",sortfilename) 
  1559.  
  1560. Parameters. 
  1561.  
  1562. dbfname 
  1563.           The REXX variable contains the name of your database as you defined 
  1564.           it in the Rexxbase_OpenDBF function. 
  1565. sortfilename 
  1566.           The sorted output file name as it will be known to the operating 
  1567.           system. 
  1568.  
  1569. The name of the database is defined in a REXX variable.  You must pass the 
  1570. variable name in a string.  For example. 
  1571.  
  1572. myfilename = 'c:\xbase\machines.dbf' ret =
  1573. rexxbase_sortdbf('myfilename','c:\xbase\machsort.dbf')
  1574.  
  1575. Return Value  Description 
  1576.  
  1577. "". 
  1578.           Normal 
  1579.  
  1580. No Rexx DBF Name specified 
  1581.           The first parameter of function call is missing. 
  1582.  
  1583. No Sort DBF Name specified 
  1584.           The second parameter of function call is missing. 
  1585.  
  1586. Unknown Database Name. 
  1587.           The name found in the passed parameter is not the same used to open 
  1588.           the database. 
  1589.  
  1590. Sort Field Count Not Found 
  1591.           The REXX variable containing the field count is missing.  See 
  1592.           *.SORTFIELD.0 above. 
  1593.  
  1594. Can't Find "fieldname" 
  1595.           The field name used then the SORTFIELD stem variables is not part of 
  1596.           this database. 
  1597.  
  1598. Not Enough Memory For Sorting 
  1599.           RexxBase uses the ram and virtual ram space to perform the sort.  The 
  1600.           database to be sorted is too large for this process. 
  1601.  
  1602. Can't Open Sort DBF File. 
  1603.           OS/2 returned a error code that indicates some type of error has 
  1604.           occurred while opening the output database. 
  1605.  
  1606. Can't Write To Sort DBF File. 
  1607.           OS/2 returned a error code that indicates some type of error has 
  1608.           occurred while writing the output database. 
  1609.  
  1610. Unable To Write Fields To File. 
  1611.           OS/2 returned a error code that indicates some type of error has 
  1612.           occurred while writing the output database. 
  1613.  
  1614. Unable To Read File. 
  1615.            The database to be sorted has an error. 
  1616.  
  1617. Sample. 
  1618.  
  1619. /* REXX */
  1620. /* sort on field name location (descending)*/
  1621. dbf = c:\users\net.dbf
  1622. ret = rexxbase_opendbf('dbf')
  1623. if ret \= '' then do
  1624.   say ret
  1625.   exit
  1626.  end
  1627. dbf.sortfield.0 = 1
  1628. dbf.sortfield.1 = location
  1629. dbf.sorttype.1 = '-'
  1630. ret = rexxbase_sortdbf('dbf',c:\users\sortloc.dbf)
  1631.  
  1632.  NOTE: 
  1633.  
  1634. MEMO fields for the original file are valid with the SORTED file.  BUT these 
  1635. MEMO fields can be corrupted with either file changes or adds a MEMO field. 
  1636. THEREFORE, if you want to use the DBT (MEMO file) with the sorted file, you 
  1637. should copy the DBT file using the SORTED file name. 
  1638.  
  1639.  dbf = 'presort.dbf'
  1640.  call rexxbase_opendbf 'dbf'
  1641.  call rexxbase_sortdbf 'dbf' 'sorted.dbf'
  1642.  "COPY presort.dbt sorted.dbt"
  1643.  sdbf = 'sorted.dbf'
  1644.  call rexxbase_opendbf 'sdbf'
  1645.  
  1646.  
  1647. ΓòÉΓòÉΓòÉ 4.16. Rexxbase_DeleteRecord. ΓòÉΓòÉΓòÉ
  1648.  
  1649. Description.  Marks the current record as deleted. 
  1650.  
  1651. Purpose. 
  1652.  
  1653. To logically delete a record. 
  1654.  
  1655. Format. 
  1656.  
  1657. rexxbase_deleterecord("dbfname") 
  1658.  
  1659. Parameters. 
  1660.  
  1661. dbfname 
  1662.           The REXX variable contains the name of your database as you defined 
  1663.           it in the Rexxbase_OpenDBF function. 
  1664.  
  1665. The name of the database is defined in a REXX variable.  You must pass the 
  1666. variable name in a string.  For example. 
  1667.  
  1668. ret = rexxbase_deleterecord('myfilename')
  1669.  
  1670. Return Value  Description 
  1671.  
  1672. "". 
  1673.           Normal 
  1674.  
  1675. No Rexx DBF Name specified 
  1676.           The first parameter of function call is missing. 
  1677.  
  1678. Unknown Database Name. 
  1679.           The name found in the passed parameter is not the same used to open 
  1680.           the database. 
  1681.  
  1682. No Record Read. 
  1683.           The procedure must do a record read before deleting a record. 
  1684.  
  1685. Sample. 
  1686.  
  1687. /* REXX */
  1688. /*mark the last record on file as undeleted */
  1689. dbf = c:\users\net.dbf
  1690. ret = rexxbase_opendbf('dbf')
  1691. if ret \= '' then do
  1692.   say ret
  1693.   exit
  1694.  end
  1695. ret = rexxbase_gotorecord('dbf',dbf.recordcount)
  1696. if ret = '' then ret = rexxbase_deleterecord('dbf')
  1697.  
  1698.  
  1699. ΓòÉΓòÉΓòÉ 4.17. Rexxbase_UndeleteRecord. ΓòÉΓòÉΓòÉ
  1700.  
  1701. Description.  Marks the current record as not deleted. 
  1702.  
  1703. Purpose. 
  1704.  
  1705. To logically undelete a record. 
  1706.  
  1707. Format. 
  1708.  
  1709. rexxbase_undeleterecord("dbfname") 
  1710.  
  1711. Parameters. 
  1712.  
  1713. dbfname 
  1714.           The REXX variable contains the name of your database as you defined 
  1715.           it in the Rexxbase_OpenDBF function. 
  1716.  
  1717. The name of the database is defined in a REXX variable.  You must pass the 
  1718. variable name in a string.  For example. 
  1719.  
  1720. rexxbase_undeleterecord('myfilename')
  1721.  
  1722. Return Value  Description 
  1723.  
  1724. "". 
  1725.           Normal 
  1726.  
  1727. No Rexx DBF Name specified 
  1728.           The first parameter of function call is missing. 
  1729.  
  1730. Unknown Database Name. 
  1731.           The name found in the passed parameter is not the same used to open 
  1732.           the database. 
  1733.  
  1734. No Record Read. 
  1735.           The procedure must do a record read before undeleting a record. 
  1736.  
  1737. Sample. 
  1738.  
  1739. /* REXX */
  1740. /*mark the last record on file as not deleted */
  1741. dbf = c:\users\net.dbf
  1742. ret = rexxbase_opendbf('dbf')
  1743. if ret \= '' then do
  1744.   say ret
  1745.   exit
  1746.  end
  1747. ret =rexxbase_gotorecord('dbf',dbf.recordcount)
  1748. if ret = '' then ret = rexxbase_undeleterecord('dbf')
  1749.  
  1750.  
  1751. ΓòÉΓòÉΓòÉ 4.18. Rexxbase_CreateDBF ΓòÉΓòÉΓòÉ
  1752.  
  1753. Description.  This will create a new database file. 
  1754.  
  1755. Prior to calling the RexxBase Create function you must specify the fields and 
  1756. the characteristics for each field.  You do this by creating field names using 
  1757. the database variable name concatenated with the FIELD string. 
  1758.  
  1759. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1760. ΓöéDatabase  Γöé*.FIELDCOUNT   ΓöéThe number of  Γöé               Γöé          Γöé
  1761. ΓöéField     Γöé               Γöéfields to be   Γöé               Γöé          Γöé
  1762. ΓöéCount     Γöé               Γöéused for       Γöé               Γöé          Γöé
  1763. Γöé          Γöé               Γöécreating the   Γöé               Γöé          Γöé
  1764. Γöé          Γöé               Γöédatabase.      Γöé               Γöé          Γöé
  1765. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1766. ΓöéField NameΓöé*.FIELDNAME.1  ΓöéThe first fieldΓöéAny valid dBaseΓöé          Γöé
  1767. Γöé1         Γöé               Γöéname.          Γöéfield name.    Γöé          Γöé
  1768. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1769. Γöé*."field  ΓöéThe first fieldΓöéSpecify C for  Γöé               Γöé          Γöé
  1770. Γöéname      Γöétype           Γöécharacter, L   Γöé               Γöé          Γöé
  1771. Γöé1".TYPE   Γöé               Γöéfor Logical, M Γöé               Γöé          Γöé
  1772. Γöé          Γöé               Γöéfor Memo, N forΓöé               Γöé          Γöé
  1773. Γöé          Γöé               ΓöéNumeric and D  Γöé               Γöé          Γöé
  1774. Γöé          Γöé               Γöéfor date.  Any Γöé               Γöé          Γöé
  1775. Γöé          Γöé               Γöéother value    Γöé               Γöé          Γöé
  1776. Γöé          Γöé               Γöéwill cause the Γöé               Γöé          Γöé
  1777. Γöé          Γöé               Γöécreate functionΓöé               Γöé          Γöé
  1778. Γöé          Γöé               Γöéto fail.       Γöé               Γöé          Γöé
  1779. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1780. Γöé*."field  ΓöéThe first fieldΓöéSpecify the    Γöé               Γöé          Γöé
  1781. Γöéname      Γöésize or length.Γöéfield length.  Γöé               Γöé          Γöé
  1782. Γöé1".LENGTH Γöé               ΓöéFor Logical,   Γöé               Γöé          Γöé
  1783. Γöé          Γöé               ΓöéMemo and Date  Γöé               Γöé          Γöé
  1784. Γöé          Γöé               Γöéfield the size Γöé               Γöé          Γöé
  1785. Γöé          Γöé               Γöéfield is       Γöé               Γöé          Γöé
  1786. Γöé          Γöé               Γöéignored and    Γöé               Γöé          Γöé
  1787. Γöé          Γöé               ΓöéRexxBase uses  Γöé               Γöé          Γöé
  1788. Γöé          Γöé               Γöéthe default    Γöé               Γöé          Γöé
  1789. Γöé          Γöé               Γöévalues.  For   Γöé               Γöé          Γöé
  1790. Γöé          Γöé               ΓöéCharacter      Γöé               Γöé          Γöé
  1791. Γöé          Γöé               Γöéfields specify Γöé               Γöé          Γöé
  1792. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé          Γöé
  1793. Γöé          Γöé               Γöéto 254.  For   Γöé               Γöé          Γöé
  1794. Γöé          Γöé               ΓöéNumeric fields Γöé               Γöé          Γöé
  1795. Γöé          Γöé               Γöéspecify the    Γöé               Γöé          Γöé
  1796. Γöé          Γöé               Γöélength in the  Γöé               Γöé          Γöé
  1797. Γöé          Γöé               Γöéformat of      Γöé               Γöé          Γöé
  1798. Γöé          Γöé               Γöélength.decimal,Γöé               Γöé          Γöé
  1799. Γöé          Γöé               Γöéwhere length isΓöé               Γöé          Γöé
  1800. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé          Γöé
  1801. Γöé          Γöé               Γöéto 19 and      Γöé               Γöé          Γöé
  1802. Γöé          Γöé               Γöédecimal (no of Γöé               Γöé          Γöé
  1803. Γöé          Γöé               Γöédecimal        Γöé               Γöé          Γöé
  1804. Γöé          Γöé               Γöépositions) is 0Γöé               Γöé          Γöé
  1805. Γöé          Γöé               Γöéto 9 (one less Γöé               Γöé          Γöé
  1806. Γöé          Γöé               Γöéthan the       Γöé               Γöé          Γöé
  1807. Γöé          Γöé               Γöélength).       Γöé               Γöé          Γöé
  1808. Γöé          Γöé               ΓöéNumeric        Γöé               Γöé          Γöé
  1809. Γöé          Γöé               Γöéaccuracy is    Γöé               Γöé          Γöé
  1810. Γöé          Γöé               Γöévalid to 15    Γöé               Γöé          Γöé
  1811. Γöé          Γöé               Γöéinteger digits Γöé               Γöé          Γöé
  1812. Γöé          Γöé               Γöéand 9 decimal  Γöé               Γöé          Γöé
  1813. Γöé          Γöé               Γöéplaces.        Γöé               Γöé          Γöé
  1814. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1815. Γöé...       Γöé...            Γöé               Γöé               Γöé          Γöé
  1816. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1817. ΓöéField n   Γöé*.FIELDNAME.n  ΓöéThe last field Γöé               Γöé          Γöé
  1818. Γöé          Γöé               Γöéin the         Γöé               Γöé          Γöé
  1819. Γöé          Γöé               Γöédatabase.  The Γöé               Γöé          Γöé
  1820. Γöé          Γöé               Γöévalue of n     Γöé               Γöé          Γöé
  1821. Γöé          Γöé               Γöéshould be equalΓöé               Γöé          Γöé
  1822. Γöé          Γöé               Γöéto the value   Γöé               Γöé          Γöé
  1823. Γöé          Γöé               Γöéspecified in   Γöé               Γöé          Γöé
  1824. Γöé          Γöé               Γöédbname.FIELDCOUΓöé               Γöé          Γöé
  1825. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1826.  
  1827. Purpose. 
  1828.  
  1829. To create a database. 
  1830.  
  1831. Format. 
  1832.  
  1833. rexxbase_createdbf("dbfname") 
  1834.  
  1835. Parameters. 
  1836.  
  1837. dbfname 
  1838.           The REXX variable contains the name of the database similar in 
  1839.           function to the database field in the Rexxbase_OpenDBF function. 
  1840.  
  1841. The name of the database is defined in a REXX variable.  You must pass the 
  1842. variable name in a string.  For example. 
  1843.  
  1844. myfilename = 'c:\xbase\newmachn.dbf'
  1845. rexxbase_createdbf('myfilename')
  1846.  
  1847. Return Value  Description 
  1848.  
  1849. "". 
  1850.           Normal 
  1851.  
  1852. No Rexx DBF Name specified 
  1853.           The first parameter of function call is missing. 
  1854.  
  1855. Bad Variable Name 
  1856.           Variable used to pass database name is not a valid REXX variable 
  1857.           name. 
  1858.  
  1859. No Filename Assigned To Variable. 
  1860.           Variable used to pass database name is empty or unassigned. 
  1861.  
  1862. Database name already In Use. 
  1863.           Database name passed is already in use. 
  1864.  
  1865. Create failed 
  1866.           refer to the following: 
  1867.  
  1868.           Unknown Field Type 
  1869.  
  1870.           Use C, D, L, M, and N only for field types. 
  1871.  
  1872.           Invalid field size 
  1873.  
  1874.           For character fields use a size from 1 through 249.  For numeric 
  1875.           fields use a size of specification of xx.yy where xx is a value from 
  1876.           1 to 19 and yy is from 0 to 9 and yy is one less than xx.  All other 
  1877.           field type length specifications default to:  8 for D, 1 for L and 10 
  1878.           for M. 
  1879.  
  1880.           Too many fields. 
  1881.  
  1882.           Only 128 fields are allowed per database. 
  1883.  
  1884.           Record size too large 
  1885.  
  1886.           Records sizes are limited to 4000 bytes. 
  1887.  
  1888. To prevent unwanted destruction of a database file refer to the RexxBase 
  1889. variable Rexxbase.Safety. 
  1890.  
  1891. Sample. 
  1892.  
  1893. /* REXX */
  1894. dbf.fieldcount = 4
  1895. dbf.fieldname.1 = location
  1896. dbf.location.type = 'c'
  1897. dbf.location.length = '10'
  1898. dbf.fieldname.2 = inuse
  1899. dbf.inuse.type = 'l'
  1900. dbf.fieldname.3 = startuse
  1901. dbf.startuse.type = 'd'
  1902. dbf.fieldname.4 = prchcost
  1903. dbf.prchcost.type = 'n'
  1904. dbf.prchcost.length = '9.2'
  1905. ret = rexxbase_createdbf('dbf')
  1906.  
  1907.  
  1908. ΓòÉΓòÉΓòÉ 4.19. Rexxbase_CreateFromDBF ΓòÉΓòÉΓòÉ
  1909.  
  1910. Description.  This will create a new database file structure only.  No data is 
  1911. added to the file.  No structure modifications may be made. 
  1912.  
  1913. Purpose. 
  1914.  
  1915. To create a database structure. 
  1916.  
  1917. Format. 
  1918.  
  1919. rexxbase_createfromdbf("dbfname","newdbfname") 
  1920.  
  1921. Parameters. 
  1922.  
  1923. dbfname 
  1924.           The REXX variable contains the name of the database similar in 
  1925.           function to the database field in the Rexxbase_OpenDBF function. 
  1926. newdbfname 
  1927.           The REXX variable contains the name of the new database. 
  1928.  
  1929. The name of the database is defined in a REXX variable.  You must pass the 
  1930. variable name in a string.  For example. 
  1931.  
  1932. oldfilename = 'c:\xbase\machn.dbf' newfilename =
  1933. 'c:\xbase\newmachn.dbf'
  1934. rexxbase_createfromdbf('oldfilename','newfilename')
  1935.  
  1936. Return Value  Description 
  1937.  
  1938. "". 
  1939.           Normal 
  1940.  
  1941. No Rexx DBF Name specified 
  1942.           The first parameter of function call is missing. 
  1943.  
  1944. Unknown Database Name. 
  1945.           The name found in the passed parameter is not the same used to open 
  1946.           the database. 
  1947.  
  1948. No DBF Name To Copy Structure To 
  1949.           This functions expects a second paramter which contains the name of 
  1950.           the file to be created. 
  1951.  
  1952. Bad Variable Name 
  1953.           Variable used to pass database name is not a valid REXX variable 
  1954.           name. 
  1955.  
  1956. No Filename Assigned To Variable. 
  1957.           Variable used to pass database name is empty or unassigned. 
  1958.  
  1959. Database Name Already In Use. 
  1960.           Database name passed is already in use. 
  1961.  
  1962. No Filename Assigned To Variable. 
  1963.           Variable used to pass database name is empty or unassigned. 
  1964.  
  1965. Database In Use. 
  1966.           Database name passed is already in use. 
  1967.  
  1968. CreateFrom Failed 
  1969.           Refer to the  rexxbase.error  stem variable.: 
  1970.  
  1971. To prevent unwanted destruction of a database file refer to the RexxBase 
  1972. variable Rexxbase.Safety. 
  1973.  
  1974. Sample. 
  1975.  
  1976. /* REXX */
  1977. parse arg olddbf newdbf
  1978. ret = rexxbase_opendbf('olddbf')
  1979. ret = rexxbase_createfromdbf('olddbf','newdbf')
  1980.  
  1981.  
  1982. ΓòÉΓòÉΓòÉ 4.20. Rexxbase_ModifyDBF ΓòÉΓòÉΓòÉ
  1983.  
  1984. Description.  This will modify the structure of a database file that is 
  1985. currently open. 
  1986.  
  1987. When a database is opened the database fields descriptions are loaded into REXX 
  1988. Variables.  By changing the values in these REXX variables you can alter the 
  1989. characteristics of a database field, remove a database field and add new 
  1990. database fields. 
  1991.  
  1992. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1993. ΓöéDatabase  Γöé*.FIELDCOUNT   ΓöéThe number of  Γöé               Γöé
  1994. ΓöéField     Γöé               Γöéfields in the  Γöé               Γöé
  1995. ΓöéCount     Γöé               Γöédatabase.      Γöé               Γöé
  1996. Γöé          Γöé               ΓöéIncrease the   Γöé               Γöé
  1997. Γöé          Γöé               Γöécount of this  Γöé               Γöé
  1998. Γöé          Γöé               Γöéfield when     Γöé               Γöé
  1999. Γöé          Γöé               Γöéadding new     Γöé               Γöé
  2000. Γöé          Γöé               Γöérecords.  If   Γöé               Γöé
  2001. Γöé          Γöé               Γöéyou decrease   Γöé               Γöé
  2002. Γöé          Γöé               Γöéthe count, the Γöé               Γöé
  2003. Γöé          Γöé               Γöétrailing fieldsΓöé               Γöé
  2004. Γöé          Γöé               Γöéwill be        Γöé               Γöé
  2005. Γöé          Γöé               Γöéremoved.  To   Γöé               Γöé
  2006. Γöé          Γöé               Γöéremove fields  Γöé               Γöé
  2007. Γöé          Γöé               Γöéin the         Γöé               Γöé
  2008. Γöé          Γöé               Γöébeginning and  Γöé               Γöé
  2009. Γöé          Γöé               Γöéthe middle of  Γöé               Γöé
  2010. Γöé          Γöé               Γöéthe field      Γöé               Γöé
  2011. Γöé          Γöé               Γöéchange the     Γöé               Γöé
  2012. Γöé          Γöé               Γöéfield type "P".Γöé               Γöé
  2013. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2014. ΓöéField NameΓöé*.FIELDNAME.1  ΓöéThe first fieldΓöé               Γöé
  2015. Γöé1         Γöé               Γöéname.          Γöé               Γöé
  2016. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2017. Γöé*."field  ΓöéThe first fieldΓöéSpecify C for  Γöé               Γöé
  2018. Γöéname      Γöétype.          Γöécharacter, L   Γöé               Γöé
  2019. Γöé1".TYPE   Γöé               Γöéfor Logical, M Γöé               Γöé
  2020. Γöé          Γöé               Γöéfor Memo, N forΓöé               Γöé
  2021. Γöé          Γöé               ΓöéNumeric and D  Γöé               Γöé
  2022. Γöé          Γöé               Γöéfor date.      Γöé               Γöé
  2023. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2024. Γöé*."field  ΓöéThe first fieldΓöéSpecify the    Γöé               Γöé
  2025. Γöéname      Γöésize or length.Γöéfield length.  Γöé               Γöé
  2026. Γöé1".LENGTH Γöé               ΓöéFor Logical,   Γöé               Γöé
  2027. Γöé          Γöé               ΓöéMemo and Date  Γöé               Γöé
  2028. Γöé          Γöé               Γöéfield the size Γöé               Γöé
  2029. Γöé          Γöé               Γöéfield is       Γöé               Γöé
  2030. Γöé          Γöé               Γöéignored and    Γöé               Γöé
  2031. Γöé          Γöé               ΓöéRexxBase uses  Γöé               Γöé
  2032. Γöé          Γöé               Γöéthe default    Γöé               Γöé
  2033. Γöé          Γöé               Γöévalues.  For   Γöé               Γöé
  2034. Γöé          Γöé               ΓöéCharacter      Γöé               Γöé
  2035. Γöé          Γöé               Γöéfields specify Γöé               Γöé
  2036. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé
  2037. Γöé          Γöé               Γöéto 254.  For   Γöé               Γöé
  2038. Γöé          Γöé               ΓöéNumeric fields Γöé               Γöé
  2039. Γöé          Γöé               Γöéspecify the    Γöé               Γöé
  2040. Γöé          Γöé               Γöélength in the  Γöé               Γöé
  2041. Γöé          Γöé               Γöéformat of      Γöé               Γöé
  2042. Γöé          Γöé               Γöélength.decimal,Γöé               Γöé
  2043. Γöé          Γöé               Γöéwhere length isΓöé               Γöé
  2044. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé
  2045. Γöé          Γöé               Γöéto 19 and      Γöé               Γöé
  2046. Γöé          Γöé               Γöédecimal (no of Γöé               Γöé
  2047. Γöé          Γöé               Γöédecimal        Γöé               Γöé
  2048. Γöé          Γöé               Γöépositions) is 0Γöé               Γöé
  2049. Γöé          Γöé               Γöéto 9 (one less Γöé               Γöé
  2050. Γöé          Γöé               Γöéthan the       Γöé               Γöé
  2051. Γöé          Γöé               Γöélength).       Γöé               Γöé
  2052. Γöé          Γöé               ΓöéNumeric        Γöé               Γöé
  2053. Γöé          Γöé               Γöéaccuracy is    Γöé               Γöé
  2054. Γöé          Γöé               Γöévalid to 15    Γöé               Γöé
  2055. Γöé          Γöé               Γöéinteger digits Γöé               Γöé
  2056. Γöé          Γöé               Γöéand 9 decimal  Γöé               Γöé
  2057. Γöé          Γöé               Γöéplaces.        Γöé               Γöé
  2058. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2059. Γöé...       Γöé...            Γöé               Γöé               Γöé
  2060. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2061. ΓöéField n   Γöé*.FIELDNAME.n  ΓöéThe last field Γöé               Γöé
  2062. Γöé          Γöé               Γöéin the         Γöé               Γöé
  2063. Γöé          Γöé               Γöédatabase.  The Γöé               Γöé
  2064. Γöé          Γöé               Γöévalue of n     Γöé               Γöé
  2065. Γöé          Γöé               Γöéshould be equalΓöé               Γöé
  2066. Γöé          Γöé               Γöéto the value   Γöé               Γöé
  2067. Γöé          Γöé               Γöéspecified in   Γöé               Γöé
  2068. Γöé          Γöé               Γöédbname.FIELDCOUΓöé               Γöé
  2069. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2070.  
  2071. Purpose. 
  2072.  
  2073. To modify a database. 
  2074.  
  2075. Format. 
  2076.  
  2077. rexxbase_modifydbf("dbfname") 
  2078.  
  2079. Parameters. 
  2080.  
  2081. dbfname 
  2082.           The REXX variable contains the name of the database similar in 
  2083.           function to the database field in the Rexxbase_OpenDBF function. 
  2084.  
  2085. The name of the database is defined in a REXX variable.  You must pass the 
  2086. variable name in a string.  For example. 
  2087.  
  2088. myfilename = 'c:\xbase\machn.dbf'
  2089. rexxbase_modifydbf('myfilename')
  2090.  
  2091. Return Value  Description 
  2092.  
  2093. "". 
  2094.           Normal 
  2095.  
  2096. No Rexx DBF Name specified 
  2097.           The first parameter of function call is missing. 
  2098.  
  2099. Unknown Database Name. 
  2100.           The name found in the passed parameter is not the same used to open 
  2101.           the database. 
  2102.  
  2103. Modify Failed 
  2104.           refer to the following: 
  2105.  
  2106.           Unknown Field Type 
  2107.  
  2108.           Use C, D, L, M, and N only for field types. 
  2109.  
  2110.           Invalid field size 
  2111.  
  2112.           For character fields use a size from 1 through 249.  For numeric 
  2113.           fields use a size of specification of xx.yy where xx is a value from 
  2114.           1 to 19 and yy is from 0 to 9 and yy is one less than xx.  All other 
  2115.           field type length specifications default to:  8 for D, 1 for L and 10 
  2116.           for M. 
  2117.  
  2118.           Too many fields. 
  2119.  
  2120.           Only 128 fields are allowed per database. 
  2121.  
  2122.           Record size too large 
  2123.  
  2124.           Records sizes are limited to 4000 bytes. 
  2125.  
  2126. Sample. 
  2127.  
  2128. /* REXX */
  2129. dbf = 'c:\xbase\newmachn.dbf'
  2130. rexxbase_opendbf('dbf')
  2131. dbf.fieldcount = 4
  2132. dbf.fieldname.1 = location
  2133. dbf.type.1 = 'c'
  2134. dbf.location.length = '10'
  2135. dbf.fieldname.2 = inuse
  2136. dbf.inuse.type = 'l'
  2137. dbf.fieldname.3 = startuse
  2138. dbf.startuse.type = 'd'
  2139. dbf.fieldname.4 = prchcost
  2140. dbf.prchcost.type = 'n'
  2141. dbf.prchcost.length = '9.2'
  2142. ret = rexxbase_modifydbf('dbf')
  2143.  
  2144.  
  2145. ΓòÉΓòÉΓòÉ 4.21. Rexxbase_CreateIndex ΓòÉΓòÉΓòÉ
  2146.  
  2147. Description.  This will create an index for an currently open database. 
  2148.  
  2149. The call the RexxBase Create Index function requires 3 parameters:  Open 
  2150. Database Name, Index file name (FAT or HPFS format) and the string defining the 
  2151. index. 
  2152.  
  2153. Purpose. 
  2154.  
  2155. To create an index for an open database. 
  2156.  
  2157. Format. 
  2158.  
  2159. rexxbase_createindex("dbfname",index file name,index string) 
  2160.  
  2161. Parameters. 
  2162.  
  2163. dbfname 
  2164.           The REXX variable contains the name of the database similar in 
  2165.           function to the database field in the Rexxbase_OpenDBF function. 
  2166. index file name 
  2167.           Any valid file name in FAT or HPFS format. 
  2168. index string 
  2169.           A string of characters used to specify the index. 
  2170.  
  2171. See REXXBASE.UNIQUE more information. 
  2172.  
  2173. See ndx definition more information. 
  2174.  
  2175. The name of the database is defined in a REXX variable.  You must pass the 
  2176. variable name in a string.  For example. 
  2177.  
  2178. myfilename = 'c:\xbase\newmachn.dbf'
  2179. myindexname = 'c:\xbase\newmachn.ndx'
  2180. rexxbase_opendbf('myfilename')
  2181. rexxbase_createindex('myfilename',myindexname,num+dept)
  2182.  
  2183. Return Value  Description 
  2184.  
  2185. "". 
  2186.           Normal 
  2187.  
  2188. No REXX DBF Name Specified 
  2189.           No argument was passed to the routine. 
  2190.  
  2191. Unknown Database Name. 
  2192.           The name found in the passed parameter is not the same used to open 
  2193.           the database. 
  2194.  
  2195. No Index File Name Specified 
  2196.           This procedure expects a second argument containing the new index 
  2197.           file name. 
  2198.  
  2199. No Index Field Names Specified 
  2200.           This procedure expects a third argument containing the index key. 
  2201.  
  2202. Index Not Built. 
  2203.           A runtime error occurred.  Review error message in  rexxbase.error 
  2204.           stem variable. 
  2205.  
  2206. Unknown field type 
  2207.           Use C, D, L, M, and N only for field types. 
  2208.  
  2209. Invalid index size 
  2210.           Indexes are limited to 100 bytes. 
  2211.  
  2212. Too many fields. 
  2213.           Only 100 fields are allowed per index. 
  2214.  
  2215. Data Type Mismatch 
  2216.           You can't mix numeric, character or date fields together 
  2217.  
  2218. Invalid Data Type 
  2219.           Memo fields and logic fields are not allowed to be used as indexes. 
  2220.  
  2221. Sample. 
  2222.  
  2223. /* REXX */
  2224. dbf = 'c:\xbase\machn.dbf'
  2225. ret = rexxbase_opendbf('dbf')
  2226. ret = rexxbase_createindex('dbf','machn.ndx',machnum)
  2227.  
  2228.  
  2229. ΓòÉΓòÉΓòÉ 4.22. Rexxbase_ReindexDBF ΓòÉΓòÉΓòÉ
  2230.  
  2231. Purpose. 
  2232.  
  2233. To rebuild all open indexes for an open database. 
  2234.  
  2235. Format. 
  2236.  
  2237. ret = rexxbase_reindexdbf(dbfname)
  2238.  
  2239. Parameters. 
  2240.  
  2241. dbfname 
  2242.           The REXX variable contains the name of the database similar in 
  2243.           function to the database field in the Rexxbase_OpenDBF function. 
  2244.  
  2245. Description.  This will rebuild all the indexes that are opened for a database 
  2246. file. 
  2247.  
  2248. When a database has been changed without its associated indexes, the index 
  2249. pointers will be incorrect.  This function will reindex the file. 
  2250.  
  2251. Also, use this function when many updates have been applied to a database, even 
  2252. with the index opened.  This will maintain the indexes for efficiency. 
  2253.  
  2254. myfilename = 'c:\xbase\machn.dbf'
  2255. rexxbase_reindexdbf('myfilename')
  2256.  
  2257. Return Value  Description 
  2258.  
  2259. "". 
  2260.           Normal 
  2261.  
  2262. No REXX DBF Name Specified 
  2263.           No argument was passed to the routine. 
  2264.  
  2265. Unknown Database Name. 
  2266.           The name found in the passed parameter is not the same used to open 
  2267.           the database. 
  2268.  
  2269. Sample. 
  2270.  
  2271. /* REXX */
  2272. dbf = 'c:\xbase\newmachn.dbf'
  2273. rexxbase_opendbf('dbf',c:\xbase\newmachn.ndx)
  2274. ret = rexxbase_reindexdbf('dbf')
  2275. say  newmachn.ndx has been reindexed
  2276. ret = rexxbase_closedbf('dbf')
  2277.  
  2278.  
  2279. ΓòÉΓòÉΓòÉ 4.23. Additional functions. ΓòÉΓòÉΓòÉ
  2280.  
  2281.  The following funcitons are available with the registered user package: 
  2282.  
  2283. o Rexxbase_ExportDBF 
  2284.  
  2285. o Rexxbase_ImportDBF 
  2286.  
  2287. o Rexxbase_FormatDate 
  2288.  
  2289. o Rexxbase_InternalDate 
  2290.  
  2291. o Rexxbase_DaysDifference 
  2292.  
  2293. o Rexxbase_DateCalc 
  2294.  
  2295. o Rexxbase_FilterDBF 
  2296.  
  2297. o Rexxbase_ScanForRecord 
  2298.  
  2299. o Rexxbase_JoinDBF 
  2300.  
  2301. o Rexxbase_SummarizeDBF 
  2302.  
  2303. o Rexxbase_ChangePrimaryIndex 
  2304.  
  2305. o Rexxbase_Soundex 
  2306.  
  2307.  
  2308. ΓòÉΓòÉΓòÉ 5. RexxBase Fields and Database Fields. ΓòÉΓòÉΓòÉ
  2309.  
  2310. RexxBase uses REXX Stem and Compound variables extensively to allow your 
  2311. procedure to use your database files. 
  2312.  
  2313.  
  2314. ΓòÉΓòÉΓòÉ 5.1. RexxBase Fields. ΓòÉΓòÉΓòÉ
  2315.  
  2316. RexxBase offers several fields for controlling your database.  All field names 
  2317. are associated with your database by using the stem variable name you pass to 
  2318. the RexxBase Functions. 
  2319.  
  2320. Also, RexxBase provides a stem variable for system errors.  The field name is 
  2321. rexxbase.error .  Refer to the section on error processing for more information 
  2322. and a list of potential error messages. 
  2323.  
  2324. Name      Description. 
  2325. "database name".RECORDCOUNT 
  2326.           Number of record on the file.  Where database name is the name your 
  2327.           program passes to RexxBase. 
  2328. "database name".RECORDNUMBER 
  2329.           The current record number.  Where database name is the name your 
  2330.           program passes to RexxBase. 
  2331. "database name".FILESTATUS 
  2332.           TOF - Top of file, BOF - End of file, or null. 
  2333. "database name".RECORDSTATUS 
  2334.           DELETED - current record is deleted, or null. 
  2335. "database name".LASTUPDATE 
  2336.           Last day file was updated. 
  2337. "database name".FIELDCOUNT 
  2338.           Number of fields on the database. 
  2339. database name".FIELDNAME.# 
  2340.           Field names on the database.  Where # is any number from 1 to the 
  2341.           number of fields as specified in FIELDCOUNT. 
  2342. "fieldname".TYPE 
  2343.           The database type for the respective field, see FIELDNAME.#. 
  2344.           "fieldname" is the name of the field in the database. 
  2345. "fieldname".LENGTH 
  2346.           The length of the respective field, see FIELDNAME.#.  "fieldname" is 
  2347.           the name of the field in the database.  Numeric fields will have in 
  2348.           the value in the format of xx.yy where xx is the length of the field 
  2349.           and yy is the number of decimal positions.  Memo fields are always 
  2350.           10.  Logical fields are always 1. 
  2351.  
  2352.  
  2353. ΓòÉΓòÉΓòÉ 5.1.1. Field Naming Convention. ΓòÉΓòÉΓòÉ
  2354.  
  2355. With the exception of RexxBase database names, all database field names are 
  2356. prefixed by the Rexx variable you use to specify the database.  For example if 
  2357. you used the REXX variable DNAME as the database name the field count variable 
  2358. name would be DNAME.FIELDCOUNT. 
  2359.  
  2360. Database field names are directly accessible by the field name in the database. 
  2361. For example if your database had three fields defined as NAME, CITY, ZIP, then 
  2362. your REXX procedure will be able to read from and write to these fields by 
  2363. using the name directly.  The database name is not prefixed to the fields 
  2364. names. 
  2365.  
  2366. To find out the field names in a database use the following example: 
  2367.  
  2368. /* REXX */
  2369. parse arg dbfname
  2370. do i = 1 to dbfname.fieldcount
  2371.   k = "say dbfname.fieldname.i "
  2372.   k = k || " dbfname."dbfname.fieldname.i".type"
  2373.   k = k || " dbfname."dbfname.fieldname.i".length"
  2374.   interpret k
  2375. end /* do */
  2376. say dbfname
  2377. do i = 1 to dbfname.recordcount
  2378.   say dbfname.recordstatus
  2379.   say reading is rexxbase_readdbf("dbfname")
  2380.   do j = 1 to dbfname.fieldcount
  2381.     k = "say dbfname.fieldname.j "
  2382.     k = k || " is dbfname." || dbfname.fieldname.j
  2383.     interpret k     /* don't let the quoted field name fool you */
  2384.     /* the first dbfname.fieldname.j will appear as the field name after interpretation*/
  2385.     /* the second will have the value appear after interpretation */
  2386.    end /* do */
  2387.  end /* do */
  2388. say rexxbase_closedbf("dbfname")
  2389. return
  2390.  
  2391.  
  2392. ΓòÉΓòÉΓòÉ 5.1.2. Your Program Changing a RexxBase Field Value. ΓòÉΓòÉΓòÉ
  2393.  
  2394. In most cases if you change a RexxBase field value, like FIELDCOUNT there will 
  2395. be no effect internally to RexxBase or the actual database file. 
  2396.  
  2397.  
  2398. ΓòÉΓòÉΓòÉ 5.2. Database Fields. ΓòÉΓòÉΓòÉ
  2399.  
  2400. Database field name are accessible by concatenating the database variable name, 
  2401. your procedure assigns when opening the database, with the field name in the 
  2402. database.  For example if your database had three fields defined as NAME, CITY, 
  2403. ZIP, and your REXX procedure opened the database as ADDRESS then your REXX 
  2404. procedure will be able to read from and write to these fields by using the 
  2405. names ADDRESS.NAME, ADDRESS.CITY AND ADDRESS.ZIP. 
  2406.  
  2407. The database name is prefixed to the fields names. 
  2408.  
  2409.  
  2410. ΓòÉΓòÉΓòÉ 5.2.1. Example of Field Naming. ΓòÉΓòÉΓòÉ
  2411.  
  2412. Unlike RexxBase field names, database field are never prefixed with the 
  2413. database name when used as a function parameter or in field definitions.  For 
  2414. example when sorting on a field, you must specify what field to sort using the 
  2415. databasename.SORTFIELD.# construct.  The field name you put into the assignment 
  2416. is simply the field name as defined to the dBase database. 
  2417.  
  2418. /* to sort on field ZIP in database ADDRESS */
  2419. address.sortfield.0 = 1
  2420. address.sortfield.1 = zip /* wrong */
  2421. /* address.sortfield.1 = address.zip */
  2422. /* this will assign the value of address.zip to address.sortfield.1 */
  2423. /* which will only work if the value of address.zip is zip */
  2424.  
  2425.  
  2426. ΓòÉΓòÉΓòÉ 5.3. Field Verification. ΓòÉΓòÉΓòÉ
  2427.  
  2428. The following field verifications and edits are used. 
  2429.  
  2430.  
  2431. ΓòÉΓòÉΓòÉ 5.3.1. Date Fields ΓòÉΓòÉΓòÉ
  2432.  
  2433. Dates are validated based on two parameters. 
  2434.  
  2435. First, is the RexxBase Variable RexxBase.FormatDate. 
  2436.  
  2437. Second, is the Country Code, as defined by OS/2 NLS. 
  2438.  
  2439. RexxBase.FormatDate takes precedence.  If it is turned "OFF" then all date 
  2440. fields are assumed to be in the following 8 numeric-character format: 
  2441. CCYYMMDD. 
  2442.  
  2443. CC - century. 
  2444.  
  2445. YY - year. 
  2446.  
  2447. MM - month. 
  2448.  
  2449. DD - day. 
  2450.  
  2451. If you need to use dates that go past 1999/12/31 then you should always use 
  2452. this format.  This is because the default century for the other formats is 
  2453. "1900." 
  2454.  
  2455. If RexxBase.FormatDate is "ON", the default value, then date fields are 
  2456. formatted based on the Country Code.  As follows:  (all are 8 bytes long with 
  2457. separators). 
  2458.  
  2459. MM/DD/YY, slashes or some other separator is required 
  2460.  
  2461. DD/MM/YY, slashes or some other separator is required 
  2462.  
  2463. YY/MM/DD, slashes or some other separator is required 
  2464.  
  2465. Edits are performed on all 4 types of date fields. 
  2466.  
  2467. Century is ignored and defaults to 19. 
  2468.  
  2469. Year is any numeric value from 00 to 99. 
  2470.  
  2471. Month is any numeric value from 01 to 12. 
  2472.  
  2473. Day is any numeric value from 01 to last day of month.  h3.Numeric Fields 
  2474.  
  2475. Numeric field verification skips over white space characters until an 
  2476. alphanumeric character is found.  If the first non-white space character is 
  2477. alphabetic then the value is stored as zero - NOTE:  there is no error message. 
  2478. Field values larger than the defined length (and/or decimal count) are 
  2479. truncated. 
  2480.  
  2481.  
  2482. ΓòÉΓòÉΓòÉ 5.3.2. Logical fields ΓòÉΓòÉΓòÉ
  2483.  
  2484. Logical fields are tested and verified for correctness as follows: 
  2485.  
  2486. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2487. ΓöéFirst Byte of       ΓöéStored Γöé                              Γöé
  2488. ΓöéLogical Field Value ΓöéAs     Γöé                              Γöé
  2489. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2490. ΓöéT, t, Y, or y       ΓöéT      Γöé                              Γöé
  2491. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2492. ΓöéF, f, N, or n       ΓöéF      Γöé                              Γöé
  2493. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2494. ΓöéAny other value     ΓöéF      ΓöéLook for error message on     Γöé
  2495. Γöé                    Γöé       Γöérexxbase.error  stem variable.Γöé
  2496. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2497.  
  2498.  
  2499. ΓòÉΓòÉΓòÉ 5.3.3. MEMO Fields. ΓòÉΓòÉΓòÉ
  2500.  
  2501. Memo field names follow the same field naming convention as other field names. 
  2502.  
  2503.  
  2504. ΓòÉΓòÉΓòÉ 6. When You Are Done. ΓòÉΓòÉΓòÉ
  2505.  
  2506. After using the RexxBase functions your REXX command file may drop the RexxBase 
  2507. functions. This can be accomplished by using the Rexxbase_ShutDown function or 
  2508. issuing the Rexx command RXFUCNDROP for each fucntion. 
  2509.  
  2510. While the IBM documentation recommends dropping functions.  we feel that it is 
  2511. an unnecessary exercise.  Do this only if you have literally thousands of 
  2512. functions registered.  The space requirements are minimal, but the search time, 
  2513. for thousands of functions, may be significant. 
  2514.  
  2515.  
  2516. ΓòÉΓòÉΓòÉ 6.1. Rexxbase_ShutDown. ΓòÉΓòÉΓòÉ
  2517.  
  2518. There may be a time when you want to drop all of the RexxBase functions from 
  2519. the Rexx function pool. To do this use the RexxBase command RexxBase_ShutDown. 
  2520. ShutDown function is to issue a Rexx Function Drop for each of the RexxBase 
  2521. functions.  It is pretty much performs the opposite utility of the 
  2522. RexxBase_Init command. 
  2523.  
  2524.  RexxBase_ShutDown() 
  2525.  
  2526.  There are no parameters. 
  2527.  
  2528.  There is no return code. 
  2529.  
  2530.  
  2531. ΓòÉΓòÉΓòÉ 6.2. Dropping Individual RexxBase Functions. ΓòÉΓòÉΓòÉ
  2532.  
  2533. The format of the command is  RXFUNCDROP(function) 
  2534.  
  2535. function is the name of the RexxBase routine as your procedure defined it. 
  2536.  
  2537. rxfuncdrop(rexxbase_opendbf) 
  2538.  
  2539. Return codes most likely to be returned are: 
  2540.  
  2541. o  0 - ok. 
  2542. o  40 - function not found. 
  2543.  
  2544.  
  2545. ΓòÉΓòÉΓòÉ 7. Returned Values and Internal Errors. ΓòÉΓòÉΓòÉ
  2546.  
  2547. The following two sections are lists of return values and internal error 
  2548. messages. 
  2549.  
  2550.  
  2551. ΓòÉΓòÉΓòÉ 7.1. Return Values and Functions ΓòÉΓòÉΓòÉ
  2552.  
  2553.  The following is a list of possible return values and associated function 
  2554. names: 
  2555.  
  2556. o Bad Record Number 
  2557.  
  2558.   Rexxbase_GoToRecord 
  2559.  
  2560. o Bad Variable Name. Rexx Rtn  is %2.2x\0 
  2561.  
  2562.   Rexxbase_OpenDBF 
  2563.  
  2564. o Bad Variable Name;  rc  is %2.2x\0 
  2565.  
  2566.   Rexxbase_CreateDBF 
  2567.  
  2568.   Rexxbase_CreateFromDBF 
  2569.  
  2570. o BOF 
  2571.  
  2572.   Rexxbase_GoToRecord 
  2573.  
  2574.   Rexxbase_ReadAndLockDBF 
  2575.  
  2576.   Rexxbase_ReadDBF 
  2577.  
  2578.   Rexxbase_ScanForRecord 
  2579.  
  2580. o Can't Create Area For Join 
  2581.  
  2582.   Rexxbase_JoinDBF 
  2583.  
  2584. o Can't Find filename 
  2585.  
  2586.   Rexxbase_SortDBF 
  2587.  
  2588. o Can't Open filename 
  2589.  
  2590.   Rexxbase_OpenDBF 
  2591.  
  2592. o Can't Open Index File, Database Is Open 
  2593.  
  2594.   Rexxbase_OpenDBF 
  2595.  
  2596. o Can't Open Sort DBF File 
  2597.  
  2598.   Rexxbase_SortDBF 
  2599.  
  2600. o Can't Write To Sort DBF file 
  2601.  
  2602.   Rexxbase_SortDBF 
  2603.  
  2604. o Create Failed 
  2605.  
  2606.   Rexxbase_CreateDBF 
  2607.  
  2608. o CreateFrom Failed 
  2609.  
  2610.   Rexxbase_CreateFromDBF 
  2611.  
  2612. o Database Name Already In Use 
  2613.  
  2614.   Rexxbase_CreateDBF 
  2615.  
  2616.   Rexxbase_CreateFromDBF 
  2617.  
  2618.   Rexxbase_OpenDBF 
  2619.  
  2620. o Database Tied To A Join 
  2621.  
  2622.   Rexxbase_CloseDBF 
  2623.  
  2624.   Rexxbase_CreateFromDBF 
  2625.  
  2626.   Rexxbase_CreateIndex 
  2627.  
  2628.   Rexxbase_DeleteRecord 
  2629.  
  2630.   Rexxbase_ExportDBF 
  2631.  
  2632.   Rexxbase_FindRecord 
  2633.  
  2634.   Rexxbase_GoToRecord 
  2635.  
  2636.   Rexxbase_ImportDBF 
  2637.  
  2638.   Rexxbase_ModifyDBF 
  2639.  
  2640.   Rexxbase_PackDBF 
  2641.  
  2642.   Rexxbase_ReadAndLockDBF 
  2643.  
  2644.   Rexxbase_ReadAndLockPrevDBF 
  2645.  
  2646.   Rexxbase_ReadDBF 
  2647.  
  2648.   Rexxbase_ReadPrevDBF 
  2649.  
  2650. o Database Tied TO A Join 
  2651.  
  2652.   Rexxbase_ReindexDBF 
  2653.  
  2654. o Database Tied To A Join 
  2655.  
  2656.   Rexxbase_ScanForRecord 
  2657.  
  2658.   Rexxbase_SortDBF 
  2659.  
  2660.   Rexxbase_UndeleteRecord 
  2661.  
  2662.   Rexxbase_UpdateDBF 
  2663.  
  2664.   Rexxbase_WriteDBF 
  2665.  
  2666. o Export Function Failed 
  2667.  
  2668.   Rexxbase_ExportDBF 
  2669.  
  2670. o First Database Name Unknown 
  2671.  
  2672.   Rexxbase_JoinDBF 
  2673.  
  2674. o First Date Is Not Valid 
  2675.  
  2676.   Rexxbase_DateCalc 
  2677.  
  2678.   Rexxbase_DaysDifference 
  2679.  
  2680. o First date Is Not Valid 
  2681.  
  2682.   Rexxbase_DaysDifference 
  2683.  
  2684. o First Joined DBF Name Not Specified 
  2685.  
  2686.   Rexxbase_JoinDBF 
  2687.  
  2688. o Import Function Failed 
  2689.  
  2690.   Rexxbase_ImportDBF 
  2691.  
  2692. o Index File Not Opened 
  2693.  
  2694.   Rexxbase_FindRecord 
  2695.  
  2696. o Index Limit Reached 
  2697.  
  2698.   Rexxbase_OpenDBF 
  2699.  
  2700. o Index Not Built 
  2701.  
  2702.   Rexxbase_CreateIndex 
  2703.  
  2704. o Internal File Processing Error 
  2705.  
  2706.   Rexxbase_ReadDBF 
  2707.  
  2708.   Rexxbase_ScanForRecord 
  2709.  
  2710.   Rexxbase_SortDBF 
  2711.  
  2712. o Invalid Condition Found 
  2713.  
  2714.   Rexxbase_FilterDBF 
  2715.  
  2716.   Rexxbase_JoinDBF 
  2717.  
  2718.   Rexxbase_ScanForRecord 
  2719.  
  2720. o Invalid Field Specification Found 
  2721.  
  2722.   Rexxbase_JoinDBF 
  2723.  
  2724. o Invalid Record Position 
  2725.  
  2726.   Rexxbase_UpdateDBF 
  2727.  
  2728. o Join Database Name Already In Use 
  2729.  
  2730.   Rexxbase_JoinDBF 
  2731.  
  2732. o Missing Index File Name,  Database is open. 
  2733.  
  2734.   Rexxbase_OpenDBF 
  2735.  
  2736. o Modify Failed 
  2737.  
  2738.   Rexxbase_ModifyDBF 
  2739.  
  2740. o No Conditions Specified 
  2741.  
  2742.   Rexxbase_ScanForRecord 
  2743.  
  2744. o No Date Specified 
  2745.  
  2746.   Rexxbase_FormatDate 
  2747.  
  2748.   Rexxbase_InternalDate 
  2749.  
  2750. o No Dates Specified 
  2751.  
  2752.   Rexxbase_DateCalc 
  2753.  
  2754.   Rexxbase_DaysDifference 
  2755.  
  2756. o No DBF Name To Copy Structure To 
  2757.  
  2758.   Rexxbase_CreateFromDBF 
  2759.  
  2760. o No Export File Name Specified 
  2761.  
  2762.   Rexxbase_ExportDBF 
  2763.  
  2764. o No Filename Assigned  To Variable 
  2765.  
  2766.   Rexxbase_CreateDBF 
  2767.  
  2768. o No Filename Assigned To Variable 
  2769.  
  2770.   Rexxbase_CreateFromDBF 
  2771.  
  2772.   Rexxbase_OpenDBF 
  2773.  
  2774. o No Import File Name Specified 
  2775.  
  2776.   Rexxbase_ImportDBF 
  2777.  
  2778. o No Index Field Names Specified 
  2779.  
  2780.   Rexxbase_CreateIndex 
  2781.  
  2782. o No Index File Name Specified 
  2783.  
  2784.   Rexxbase_CreateIndex 
  2785.  
  2786. o No Joining Condition Specified 
  2787.  
  2788.   Rexxbase_JoinDBF 
  2789.  
  2790. o No Joining Fields Specified 
  2791.  
  2792.   Rexxbase_JoinDBF 
  2793.  
  2794. o No Locate String Specified 
  2795.  
  2796.   Rexxbase_FindRecord 
  2797.  
  2798. o No Lock Time Specified 
  2799.  
  2800.   Rexxbase_SetLockTimeout 
  2801.  
  2802. o No Record Number Specified 
  2803.  
  2804.   Rexxbase_GoToRecord 
  2805.  
  2806. o No Record Read 
  2807.  
  2808.   Rexxbase_DeleteRecord 
  2809.  
  2810.   Rexxbase_UndeleteRecord 
  2811.  
  2812. o No Rexx DBF Name Specified 
  2813.  
  2814.   Rexxbase_CloseDBF 
  2815.  
  2816.   Rexxbase_CreateDBF 
  2817.  
  2818.   Rexxbase_CreateFromDBF 
  2819.  
  2820.   Rexxbase_CreateIndex 
  2821.  
  2822.   Rexxbase_DeleteRecord 
  2823.  
  2824.   Rexxbase_ExportDBF 
  2825.  
  2826.   Rexxbase_FilterDBF 
  2827.  
  2828.   Rexxbase_FindRecord 
  2829.  
  2830.   Rexxbase_GoToRecord 
  2831.  
  2832.   Rexxbase_ImportDBF 
  2833.  
  2834.   Rexxbase_ModifyDBF 
  2835.  
  2836.   Rexxbase_OpenDBF 
  2837.  
  2838.   Rexxbase_PackDBF 
  2839.  
  2840.   Rexxbase_ReadAndLockDBF 
  2841.  
  2842.   Rexxbase_ReadAndLockPrevDBF 
  2843.  
  2844.   Rexxbase_ReadDBF 
  2845.  
  2846.   Rexxbase_ReadPrevDBF 
  2847.  
  2848.   Rexxbase_ReindexDBF 
  2849.  
  2850.   Rexxbase_ScanForRecord 
  2851.  
  2852.   Rexxbase_SortDBF 
  2853.  
  2854.   Rexxbase_UndeleteRecord 
  2855.  
  2856.   Rexxbase_UnlockDBF 
  2857.  
  2858.   Rexxbase_UpdateDBF 
  2859.  
  2860.   Rexxbase_WriteDBF 
  2861.  
  2862. o No Rexx Joined DBF Name Specified 
  2863.  
  2864.   Rexxbase_JoinDBF 
  2865.  
  2866. o No Sort DBF Name Specified 
  2867.  
  2868.   Rexxbase_SortDBF 
  2869.  
  2870. o Not Enough Memory For Sorting 
  2871.  
  2872.   Rexxbase_SortDBF 
  2873.  
  2874. o Number Of Days Is Missing 
  2875.  
  2876.   Rexxbase_DateCalc 
  2877.  
  2878. o Record Not Found 
  2879.  
  2880.   Rexxbase_FindRecord 
  2881.  
  2882. o Second Database Name Unknown 
  2883.  
  2884.   Rexxbase_JoinDBF 
  2885.  
  2886. o Second date Is Missing 
  2887.  
  2888.   Rexxbase_DaysDifference 
  2889.  
  2890. o Second Date Is Not Valid 
  2891.  
  2892.   Rexxbase_DaysDifference 
  2893.  
  2894. o Second Joined DBF Name Not Specified 
  2895.  
  2896.   Rexxbase_JoinDBF 
  2897.  
  2898. o Sort Field Count Not Found 
  2899.  
  2900.   Rexxbase_SortDBF 
  2901.  
  2902. o TOF 
  2903.  
  2904.   Rexxbase_GoToRecord 
  2905.  
  2906.   Rexxbase_ReadAndLockPrevDBF 
  2907.  
  2908.   Rexxbase_ReadPrevDBF 
  2909.  
  2910. o Unable To Write Fields To  File; rc = %3.3d 
  2911.  
  2912.   Rexxbase_SortDBF 
  2913.  
  2914. o Unknown Database Name 
  2915.  
  2916.   Rexxbase_CloseDBF 
  2917.  
  2918.   Rexxbase_CreateFromDBF 
  2919.  
  2920.   Rexxbase_CreateIndex 
  2921.  
  2922.   Rexxbase_DeleteRecord 
  2923.  
  2924.   Rexxbase_ExportDBF 
  2925.  
  2926.   Rexxbase_FilterDBF 
  2927.  
  2928.   Rexxbase_FindRecord 
  2929.  
  2930.   Rexxbase_GoToRecord 
  2931.  
  2932.   Rexxbase_ImportDBF 
  2933.  
  2934.   Rexxbase_ModifyDBF 
  2935.  
  2936.   Rexxbase_PackDBF 
  2937.  
  2938.   Rexxbase_ReadAndLockDBF 
  2939.  
  2940.   Rexxbase_ReadAndLockPrevDBF 
  2941.  
  2942.   Rexxbase_ReadDBF 
  2943.  
  2944.   Rexxbase_ReadPrevDBF 
  2945.  
  2946.   Rexxbase_ReindexDBF 
  2947.  
  2948.   Rexxbase_ScanForRecord 
  2949.  
  2950.   Rexxbase_SortDBF 
  2951.  
  2952.   Rexxbase_UndeleteRecord 
  2953.  
  2954.   Rexxbase_UnlockDBF 
  2955.  
  2956.   Rexxbase_UpdateDBF 
  2957.  
  2958.   Rexxbase_WriteDBF 
  2959.  
  2960.  
  2961. ΓòÉΓòÉΓòÉ 7.2. Internal Errors. ΓòÉΓòÉΓòÉ
  2962.  
  2963. The following is a list of internal errors.  At a later release there will be a 
  2964. full discussion of these errors. 
  2965.  
  2966. o All other data ignored after DBF name 
  2967.  
  2968. o All other data ignored after Sort DBF  name 
  2969.  
  2970. o alloc error 
  2971.  
  2972. o Bad date found, changed to all spaces. 
  2973.  
  2974. o Bad field type when getting field value 
  2975.  
  2976. o Can't allocate memo space 
  2977.  
  2978. o Can't make logical field part of a key 
  2979.  
  2980. o Can't make memo field part of a key 
  2981.  
  2982. o can't position at end of memo file 
  2983.  
  2984. o Data type mismatch 
  2985.  
  2986. o Data Type Mismatch 
  2987.  
  2988. o Field delimiter character not found. Import stops. 
  2989.  
  2990. o Field truncated 
  2991.  
  2992. o Field truncated. 
  2993.  
  2994. o Invalid expression 
  2995.  
  2996. o Invalid expression - data type mismatch 
  2997.  
  2998. o Invalid expression - invalid logic connector 
  2999.  
  3000. o Key length too long 
  3001.  
  3002. o Key length too short 
  3003.  
  3004. o logic field value invalid, value set to 'F' 
  3005.  
  3006. o Memo field missing field delimiter, Import stops. 
  3007.  
  3008. o Memo field missing start field delimiter, Import stops. 
  3009.  
  3010. o Memo fields not allowed in conditions 
  3011.  
  3012. o Not enough memory for index sorting 
  3013.  
  3014. o Numeric field expected, not found on input file. Import stops. 
  3015.  
  3016. o passed bad memopointer to write memo 
  3017.  
  3018. o Read record size does not match 
  3019.  
  3020. o Third parameter must be EXACT.  Parameter ignored 
  3021.  
  3022. o Too many files opened 
  3023.  
  3024. o Unable to change memo file size. 
  3025.  
  3026. o Unknown delimiter character found. Import stops 
  3027.  
  3028. o Unknown field name in field list 
  3029.  
  3030. o Unknown field specified in key file define 
  3031.  
  3032. o Unknown field specified in key file open 
  3033.  
  3034. o Unknown name in expression 
  3035.  
  3036. o Unknown operator type in parse expression logic 
  3037.  
  3038. o Would add duplicate 
  3039.  
  3040. o Written record size does not match 
  3041.  
  3042.  
  3043. ΓòÉΓòÉΓòÉ 8. Control Variables. ΓòÉΓòÉΓòÉ
  3044.  
  3045. The following is a description of RexxBase error, file, and date handling and 
  3046. extended control facilities. 
  3047.  
  3048.  
  3049. ΓòÉΓòÉΓòÉ 8.1. RexxBase Errors ΓòÉΓòÉΓòÉ
  3050.  
  3051. Errors are reported in two different ways, return codes and the error stem 
  3052. variable. If the RexxBase function returns a value other than "" then the 
  3053. function did not complete successfully. 
  3054.  
  3055.  
  3056. ΓòÉΓòÉΓòÉ 8.1.1. Where To Find Internal Error Messages ΓòÉΓòÉΓòÉ
  3057.  
  3058. Whether a function failed or not, there maybe other types of errors and warning 
  3059. messages that are useful to your program. These messages are found in the 
  3060. RexxBase error stem variable. 
  3061.  
  3062. All internal system and control errors are directed to a stem variable named 
  3063. REXXBASE.ERROR.  The zeroth element is a counter This element contains them 
  3064. number of errors in the stem variable.  Each time you call a RexxBase function 
  3065. the counter is reset to zero.  Your procedure should check what is returned 
  3066. from the function call. 
  3067.  
  3068. For a further description of stem variables refer to your Rexx documentation. 
  3069.  
  3070.  
  3071. ΓòÉΓòÉΓòÉ 8.1.2. Internal Error List. ΓòÉΓòÉΓòÉ
  3072.  
  3073. The following is a list of errors and a brief explanation. 
  3074.  
  3075. Error     Description 
  3076. All other data ignored after Sort DBF name 
  3077.           More parameters were specified than are required 
  3078. Logic field value invalid, value set to 'F' 
  3079.           The value of a logic field, which will be adding to or updating a 
  3080.           database record contained an invalid value. 
  3081. Can't position at end of memo file 
  3082.           There is a severe error with a DBT file. 
  3083. Bad field type when getting field value 
  3084.           Internal error - A field type has changed 
  3085. Bad date found, changed to all spaces. 
  3086.           The value of a date field, which will be added to or updating a 
  3087.           database record contained an invalid value. 
  3088. All other data ignored after DBF name 
  3089.           More parameters were specified than are required 
  3090. Dos open error ### for file @@@@@@@@@@ 
  3091.           Operating system error, value found in ###, while trying to open file 
  3092.           @@@@@@@@@@@ 
  3093. Dos read anchor error #### for file @@@@@@@@@@ 
  3094.           Operating system error, value found in ###, while trying to read file 
  3095.           @@@@@@@@@@@ 
  3096. Unknown field specified in key file open 
  3097.           A field name specified in an index build is not part of the database 
  3098. Can't make memo field part of a key 
  3099.           A field name specified in an index build is a memo field.  Memo 
  3100.           fields can not be part of an index. 
  3101. Can't make logical field part of a key 
  3102.           A field name specified in an index build is a logical field.  Logical 
  3103.           fields can not be part of an index. 
  3104. Unknown field specified in key file define 
  3105.           A field name specified in an index build is not in the database. 
  3106. Key length too short 
  3107.           Internal error, the calculated length for a key is less than one (1). 
  3108. Would add duplicate 
  3109.           Writing a new record to database creates a duplicate key.  Unique key 
  3110.           value is FALSE. 
  3111. Dos write anchor error #### for file @@@@@@@@@@ 
  3112.           Operating system error, value found in ###, while trying to write 
  3113.           file @@@@@@@@@@@ 
  3114. Not enough memory for index sorting. 
  3115.           Not enough internal memory space to create temporary sort file for 
  3116.           indexing function. 
  3117. Can't rename file for modify 
  3118.           Modify Structure function attempts to rename the old file.  Failure 
  3119.           probably caused by duplicate name. 
  3120. Can't rebuild, old file not open 
  3121.           Internal error.  Somehow the file has been closed. 
  3122. Can't rebuild, new file not created 
  3123.           Modify Structure function attempted to create the new file.  Old file 
  3124.           has been renamed but ...failure probably caused by duplicate name or 
  3125.           lack of disk space. 
  3126. Unable to allocate temp file memory ## 
  3127.           Not enough internal memory space to create file space.  Operating 
  3128.           system error value is ## 
  3129. Dos open error ### for text file @@@@@@@@@@@ 
  3130.           Operating system error, value found in ###, while trying to open DBT 
  3131.           file @@@@@@@@@@@ 
  3132. Field Not Defined 
  3133.           Create function error - can not find variable. 
  3134. Bad Field Count 
  3135.           Field count for Create is either less than 1 or greater than 128 
  3136. Field Name Not Okay 
  3137.           Field name does not satisfy naming convention. 
  3138. Field Type Not Defined 
  3139.           Create function needs to know the field type(characteristics) 
  3140. Field Type Not Valid 
  3141.           Field type specified is not C, D, L, N or M. 
  3142. Field Type Not Valid 
  3143.           Create function needs to know the field length 
  3144. Field Length Not Defined Correctly 
  3145.           The field length requested does not satisfy the length limitations 
  3146.           for its type. 
  3147. Record Size Too Large 
  3148.           Calculated record length is greater than 4000.  4000 is maximum 
  3149.           allowed. 
  3150.  
  3151.  
  3152. ΓòÉΓòÉΓòÉ 8.2. File Control Variables ΓòÉΓòÉΓòÉ
  3153.  
  3154. RexxBase offers several control variables to enhance control over your database 
  3155. files. 
  3156.  
  3157.  
  3158. ΓòÉΓòÉΓòÉ 8.2.1. REXXBASE.UPDATEHEADERCOUNTER. ΓòÉΓòÉΓòÉ
  3159.  
  3160. You can control how often the database header record gets updated.  You change 
  3161. the RexxBase.UpdateHeaderCounter.  This sets an internal counter indicating how 
  3162. often after every RexxBase_WriteDBF command the header record is updated.  The 
  3163. higher the number the less often the header record is updated.  But if the 
  3164. header record is not updated  and there is a system crash then the header 
  3165. record will not contain accurate information. 
  3166.  
  3167. The default value is one. 
  3168.  
  3169. A value of zero indicates that the header record is only updated when the 
  3170. database is closed. 
  3171.  
  3172. The value is only set when a database is opened.  Therefore changing the value 
  3173. after a database has been opened has no affect on that database. 
  3174.  
  3175.  
  3176. ΓòÉΓòÉΓòÉ 8.2.2. Safety - Preventing File Deletion ΓòÉΓòÉΓòÉ
  3177.  
  3178. REXXBASE.SAFETY allows for a level of protection from destroying, deleting or 
  3179. overwriting database and index files. 
  3180.  
  3181. When your routine sets REXXBASE.SAFETY to "ON", anytime RexxBase opens a file, 
  3182. in a creation function (i.e.  sort output file, create index, etc.)  the 
  3183. function will fail.  Check both the return code from the function and/or the 
  3184. rexxbase.error  stem variable. 
  3185.  
  3186. When REXXBASE.SAFETY is set to "OFF" then any routine can destroy a file. 
  3187. There may be information in the  rexxbase.error  stem variable but the return 
  3188. code, even if successful, will be "". 
  3189.  
  3190. The default value is "OFF".  If set incorrectly the default value will be used. 
  3191.  
  3192.  
  3193. ΓòÉΓòÉΓòÉ 8.2.3. REXXBASE.READ ΓòÉΓòÉΓòÉ
  3194.  
  3195. When REXXBASE.READ is set to "OFF" then the Rexxbase_OpenDBF will open the file 
  3196. for NO read access.  This means any routine that reads a file, that was opened 
  3197. when set REXXBASE.READ was set to "OFF", will fail. 
  3198.  
  3199. The default value is "ON".  If set incorrectly the default value will be used. 
  3200.  
  3201.  
  3202. ΓòÉΓòÉΓòÉ 8.2.4. REXXBASE.WRITE ΓòÉΓòÉΓòÉ
  3203.  
  3204. When REXXBASE.WRITE is set to "OFF" then the Rexxbase_OpenDBF will open the 
  3205. file for NO write access.  This means any routine that writes to a file, that 
  3206. was opened when set REXXBASE.READ was set to "OFF", will fail. 
  3207.  
  3208. The default value is "ON".  If set incorrectly the default value will be used. 
  3209.  
  3210.  
  3211. ΓòÉΓòÉΓòÉ 8.2.5. REXXBASE.UNIQUE ΓòÉΓòÉΓòÉ
  3212.  
  3213. When REXXBASE.UNIQUE is set to "ON" then the Rexxbase_CreateIndex creates an 
  3214. index file with unique keys.  This prevents duplicate keys from being added to 
  3215. the index file. 
  3216.  
  3217. When REXXBASE.UNIQUE is set to "OFF" then the Rexxbase_CreateIndex creates an 
  3218. index file without unique keys.  This prevents duplicate keys from being added 
  3219. to the index file with Rexxbase_ReadDBF and Rexxbase_UpdateDBF functions. 
  3220.  
  3221. The default value is "OFF".  If set incorrectly the default value will be used. 
  3222.  
  3223.  
  3224. ΓòÉΓòÉΓòÉ 8.2.6. REXXBASE.SHARE ΓòÉΓòÉΓòÉ
  3225.  
  3226. Rexxbase offers a facility for file sharing your databases. 
  3227.  
  3228. When REXXBASE.SHARE is set to "OFF" then the Rexxbase_OpenDBF will open the 
  3229. file NO OTHER external program file access.  This will prevent any other 
  3230. program in the system from accessing the file.  Also, if the file is already 
  3231. opened, by another program, your routine will fail.  This is file locking. 
  3232.  
  3233. When REXXBASE.SHARE is set to "READ" then the Rexxbase_OpenDBF will open the 
  3234. file for read only sharing.  This will allow any other program in the system to 
  3235. read your open database file. 
  3236.  
  3237. Also, if the file is already opened by another program for no read sharing, 
  3238. your routine will fail. 
  3239.  
  3240. When REXXBASE.SHARE is set to "WRITE" then the Rexxbase_OpenDBF will open the 
  3241. file for write only sharing.  This will allow any other program in the system 
  3242. to have write access the file, not read access. 
  3243.  
  3244. Also, if the file is already opened by another program for no write sharing, 
  3245. your routine will fail. 
  3246.  
  3247. When REXXBASE.SHARE is set to "READWRITE" then the Rexxbase_OpenDBF will open 
  3248. the file for read and write sharing.  This will allow any other program in the 
  3249. system to have access the file. 
  3250.  
  3251. Also, if the file is already opened by another program for no sharing, your 
  3252. routine will fail. 
  3253.  
  3254. The default value is "OFF".  If set incorrectly the default value will be used. 
  3255.  
  3256. You may set REXXBASE.SHARE at anytime and as often as you like.  But it is only 
  3257. used when the database is opened with a Rexxbase_OpenDBF. 
  3258.  
  3259.  
  3260. ΓòÉΓòÉΓòÉ 8.3. Controlling Date Format. ΓòÉΓòÉΓòÉ
  3261.  
  3262. RexxBase offers a way to control the format of dates.  By turning the format 
  3263. control on and off dates are presented in either internal xBase format or in a 
  3264. display format. 
  3265.  
  3266.  
  3267. ΓòÉΓòÉΓòÉ 8.3.1. REXXBASE.FORMATDATE. ΓòÉΓòÉΓòÉ
  3268.  
  3269. When RexxBase.FormatDate is turned "OFF" then all date fields are in the 
  3270. following 8 numeric-character format:  CCYYMMDD. 
  3271.  
  3272. CC - century. 
  3273.  
  3274. YY - year. 
  3275.  
  3276. MM - month. 
  3277.  
  3278. DD - day. 
  3279.  
  3280. If RexxBase.FormatDate is "ON", the default value, then date fields are 
  3281. formatted based on the Country Code.  as follows:  (all are 8 bytes long with 
  3282. separators). 
  3283.  
  3284. MM/DD/YY, slashes or some other separator is required 
  3285.  
  3286. DD/MM/YY, slashes or some other separator is required 
  3287.  
  3288. YY/MM/DD, slashes or some other separator is required 
  3289.  
  3290. The default value is "ON".  If set incorrectly the default value will be used. 
  3291.  
  3292.  
  3293. ΓòÉΓòÉΓòÉ 9. Next Releases. ΓòÉΓòÉΓòÉ
  3294.  
  3295. The following is a list of the next planned releases. 
  3296.  
  3297. This is a statement of direction.  In any event, American Coders may, at 
  3298. anytime, decide not to complete any or all of these releases. 
  3299.  
  3300. Also, this does not guarantee the these releases will be completed in this 
  3301. order. 
  3302.  
  3303.  
  3304. ΓòÉΓòÉΓòÉ 9.1. dBase IV file structures. ΓòÉΓòÉΓòÉ
  3305.  
  3306. Will allow acces to dBase IV: DBF, DBT and MDX files. 
  3307.  
  3308.  
  3309. ΓòÉΓòÉΓòÉ 9.2. SOM/DSOM Interface To The Database Routines. ΓòÉΓòÉΓòÉ
  3310.  
  3311. Gain access to the database, outside the realm of Rexx, using C/C++ class 
  3312. libraries through objects. 
  3313.  
  3314.  
  3315. ΓòÉΓòÉΓòÉ 10. Suggestions and Bugs. ΓòÉΓòÉΓòÉ
  3316.  
  3317. Please call or write to us at our address with suggestions or to report bugs. 
  3318.  
  3319. You can reach us through CompuServe by contacting Joe McVerry at 74150,2370 
  3320.  
  3321.  
  3322. ΓòÉΓòÉΓòÉ 11. Shareware Software ΓòÉΓòÉΓòÉ
  3323.  
  3324. DEFINITION OF SHAREWARE SOFTWARE 
  3325.  
  3326. Shareware Software distribution gives users a chance to try software before 
  3327. buying it.  If you try a Shareware software program and continue using it, you 
  3328. are expected to register.  Individual programs differ on details -- some 
  3329. request registration while others require it, some specify a maximum trial 
  3330. period.  With registration, you get anything from the simple right to continue 
  3331. using the software to an updated program with printed manual. 
  3332.  
  3333.  
  3334. ΓòÉΓòÉΓòÉ 11.1. Copyright ΓòÉΓòÉΓòÉ
  3335.  
  3336. Copyright laws apply to both Shareware and commercial software, and the 
  3337. copyright holder retains all rights, with a few specific exceptions as stated 
  3338. below.  Shareware software authors are accomplished programmers, just like 
  3339. commercial authors, and the programs are of comparable quality.  (In both 
  3340. cases, there are good programs and bad ones!)  The main difference is in the 
  3341. method of distribution.  The author specifically grants the right to copy and 
  3342. distribute the software, either to all and sundry or to a specific group.  For 
  3343. example, some authors require written permission before a commercial disk 
  3344. vendor may copy their Shareware software. 
  3345.  
  3346.  
  3347. ΓòÉΓòÉΓòÉ 11.2. Distribution. ΓòÉΓòÉΓòÉ
  3348.  
  3349. Shareware software is a distribution method, not a type of software.  You 
  3350. should find software that suits your needs and pocketbook, whether it's 
  3351. commercial or Shareware software.  The Shareware software system makes fitting 
  3352. your needs easier, because you can try before you buy.  And because the 
  3353. overhead is low, prices are low also.  Shareware software has the ultimate 
  3354. money-back guarantee -- if you don't use the product, you don't pay for it. 
  3355.  
  3356.  
  3357. ΓòÉΓòÉΓòÉ 12. Disclaimer ΓòÉΓòÉΓòÉ
  3358.  
  3359. DISCLAIMER - AGREEMENT 
  3360.  
  3361. Users of RexxBase must accept this disclaimer of warranty:  "REXXBASE IS 
  3362. SUPPLIED AS IS.  AMERICAN CODERS DISCLAIMS ALL WARRANTIES, EXPRESSED OR 
  3363. IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND 
  3364. OF FITNESS FOR ANY PURPOSE.  AMERICAN CODERS LTD.  ASSUMES NO LIABILITY FOR 
  3365. DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE OF REXXBASE." 
  3366.  
  3367.  
  3368. ΓòÉΓòÉΓòÉ 13. Sharing RexxBase ΓòÉΓòÉΓòÉ
  3369.  
  3370. RexxBase is a "Shareware software program" and is provided at no charge to the 
  3371. user for evaluation.  Feel free to share it with your friends, but please do 
  3372. not give it away altered or as part of another system.  The essence of 
  3373. "user-supported" software is to provide personal computer users with quality 
  3374. software without high prices, and yet to provide incentive for programmers to 
  3375. continue to develop new products.  If you find this program useful and find 
  3376. that you are using RexxBase and continue to use RexxBase after a reasonable 
  3377. trial period of 30 days, you must make a registration payment of $95.00 to 
  3378. American Coders, Ltd.  The $95.00 registration fee will license one copy for 
  3379. use on any one computer at any one time.  You must treat this software just 
  3380. like a book.  An example is that this software may be used by any number of 
  3381. people and may be freely moved from one computer location to another, so long 
  3382. as there is no possibility of it being used at one location while it's being 
  3383. used at another.  Just as a book cannot be read by two different persons at the 
  3384. same time. 
  3385.  
  3386.  
  3387. ΓòÉΓòÉΓòÉ 13.1. Commercial Users ΓòÉΓòÉΓòÉ
  3388.  
  3389. Commercial users of RexxBase must register and pay for their copies of RexxBase 
  3390. within 30 days of first use or their license is withdrawn.  Site-License 
  3391. arrangements may be made by contacting American Coders, Ltd. 
  3392.  
  3393.  
  3394. ΓòÉΓòÉΓòÉ 13.2. Distributing ΓòÉΓòÉΓòÉ
  3395.  
  3396. Anyone distributing RexxBase for any kind of remuneration must first contact 
  3397. American Coders, Ltd. at our address below for authorization.  This 
  3398. authorization will be automatically granted to distributors recognized by the 
  3399. (ASP) as adhering to its guidelines for shareware distributors, and such 
  3400. distributors may begin offering RexxBase immediately (However American Coders, 
  3401. Ltd.  must still be advised so that the distributor can be kept up-to-date with 
  3402. the latest version of RexxBase.). 
  3403.  
  3404.  
  3405. ΓòÉΓòÉΓòÉ 13.3. Pass Along ΓòÉΓòÉΓòÉ
  3406.  
  3407. You are encouraged to pass a copy of RexxBase along to your friends for 
  3408. evaluation.  Please encourage them to register their copy if they find that 
  3409. they can use it.  All registered users will receive a copy of the latest 
  3410. version of the RexxBase system.